linter errors in auth.guard.ts

This commit is contained in:
Tom Bloor 2017-09-19 11:09:30 +01:00
parent baf64ff4b7
commit 8807ba6cc9

View file

@ -8,13 +8,13 @@ export class AuthGuard implements CanActivate {
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
if (localStorage.getItem('sessionKey')) {
console.log('session key found')
console.log('session key found');
// logged in so return true
return true;
}
// not logged in so redirect to login page with the return url
console.log('no session key found')
console.log('no session key found');
this.router.navigate(['/login'], { queryParams: { returnUrl: state.url }});
return false;
}