I've created a new project using the asp.net boilerplate
a so it comes standard with the default landing page as the login page. So is it possible to create a new component and change the default landing page to the component that I have just created and create a link to the only page?
Asked
Active
Viewed 639 times
0

Tebogo Langa
- 47
- 1
- 10
1 Answers
0
On the angular project under the src/shared/auth folder change the canActivate function to check if there is a session created and redirect to the specific component
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {
if (!this._sessionService.user) {
this._router.navigate(['FolderName/ComponentName']);
return false;
}
}

Tebogo Langa
- 47
- 1
- 10