我想通过 mvc 操作在 Angular 函数中成功后重定向用户。这是我的 Controller :
$scope.login = function () {
debugger;
authService.login($scope.loginData).then(function (response) {
debugger;
$modalInstance.close(true);
$location.path('/Home');
},
function (err) {
$scope.message = err.error_description;
$modalInstance.dismiss();
});
};
但它不起作用?
肮脏的方式是:
<p class="login-success" ng-if="cartable">
@Html.ActionLink("ورود به کارتابل", "Index", "Home", null, null)
</p>
最佳答案
如果你尝试普通的 javascript 方式会怎样?
window.location.href="yournewUrlHere";
关于asp.net-mvc - 如何通过 mvc 操作在 Angular 函数后重定向,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29719281/