Q. How do you protect routes in Angular so that only authorized users can access them?

  • (A) Using route guards (CanActivate)
  • (B) Using interceptors
  • (C) Using HTTPClient
  • (D) Using ngIf
πŸ’¬ Discuss
βœ… Correct Answer: (A) Using route guards (CanActivate)
Explanation: Route guards control access to routes based on custom logic.
Explanation by: Mr. Dubey
Route guards control access to routes based on custom logic.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
77
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
87%
Success Rate