0

I am working on Angularjs Authentication and I am getting tokens from web API, in routechange event I want to check the generated token is valid or not, if it is valid then i want to redirect to some other route, if the token is not valid then i want to redirect to login page.

How to check the token is valid or not

1 Answer 1

1

I think you wil need to look at $rootScope.$on('$stateChangeStart', function(){});

to validate your token;

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.