I have implemented the CanActivate router guard for my Angular 5.2 app. If it returns true the URL does not change, but when it returns false, the URL changes and appends the path to the URL. Everywhere in the app that we change the route it skipsLocationChange so the URL never changes, but it does in this case. This is what the canActivate code looks like basically.
canActivate(){
if(someRightsThatReturnsTrue)
return true;
else{
this.router.navigateByURL('noauthpage', {skipLocationChange: true});
return false;
}
}
Any ideas on why the URL is changing? Is it an Router mechanic because it can't render the page and is 'failing'?