Web Development
Angular
Subjective
Oct 23, 2025
What are Angular route guards and their types?
Detailed Explanation
Route guards control navigation. Types: CanActivate (Can route be activated?), CanDeactivate (Can user leave?), CanLoad (Can module be loaded?), Resolve (Pre-fetch data). Example: @Injectable() export class AuthGuard implements CanActivate { canActivate(): boolean { return this.authService.isAuthenticated(); } }
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts