2015-04-18 36 views
2

我想通過mvc動作在角度函數成功後重定向用戶。這裏是我的控制器:如何在角度函數後通過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> 

回答

2

,如果你嘗試香草什麼JavaScript的方式?

window.location.href="yournewUrlHere"; 
相關問題