ページを index.html にリダイレクトしようとすると、次のエラーが表示されます: $location is undefined. ユーザーとパスワードが正しい場合は、インデックス ページにリダイレクトする必要があります。
app.controller('loginController', ['$scope', '$kinvey', function($scope, $kinvey, $location) {
$scope.login = function() {
var promise = $kinvey.User.login({
username : $scope.username,
password : $scope.password
});
promise.then(function(response) {
console.log('User in');
$location.path('/index.html');
}, function(err) {
console.log(err);
});
}
}
]);