2

I want to redirect user after success in angular function by mvc action. here is my 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();
         });
    };  

but it's not working ?

the dirty way is :

<p class="login-success" ng-if="cartable">


                    @Html.ActionLink("ورود به کارتابل", "Index", "Home", null, null)


                    </p>

1 Answer 1

2

What if you try the vanilla javascript way ?

window.location.href="yournewUrlHere";
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.