Skip to content Skip to sidebar Skip to footer

Angular 2 Routerstatesnapshot Not Returning Correct Url

I'm trying to get the redirect after login working based on the documentation from angular. https://angular.io/docs/ts/latest/guide/router.html#!#teach-authguard-to-authenticate I

Solution 1:

you are using same AuthGuard for all the paths, hence you are seeing that result, you can either create different Auth guards for different routes or have some logic to identify when the same canActivate is called.

Hope this helps!!

Post a Comment for "Angular 2 Routerstatesnapshot Not Returning Correct Url"