Your application has a module that is loaded lazily, and you want to ensure that this module is only loaded for administrators. How would you implement this restriction?

  • CanActivateChild
  • CanDeactivate
  • CanLoad
  • Resolve
To ensure that a module is only loaded for specific users (e.g., administrators), you would use the CanLoad route guard. This guard is applied at the route level and checks whether the user is authorized to load a lazy-loaded module.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *