我想通过mvc动作在角度函数成功后重定向用户。这是我的控制器:
$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>
答案 0 :(得分:2)
如果你尝试使用vanilla javascript方式怎么办?
window.location.href="yournewUrlHere";