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