app.controller('LoginController', ['$http','$scope', function ($http, $scope, $location) {
$location.path("Home/Index");
}]);
浏览器在未定义时给出$ location的错误,我如何排除故障
答案 0 :(得分:3)
您没有将$location
添加到依赖表示法:
app.controller('LoginController', ['$http','$scope', '$location', function ($http, $scope, $location) {
$location.path("Home/Index");
}]);