Jul 29, 2024
/dmps), they might attempt to access it even if not logged in, which shouldn't happen.service if not done already, then open a new terminal in that folder.ng generate guard AuthenticationGuard.CanActivate when prompted.true (access granted).false (access denied).let loggedUser = localStorage.getItem('key');
if (loggedUser != null) {
return true;
} else {
this.router.navigate(['login']);
return false;
}