If you have an application where some modules are loaded on-demand, and you want to restrict this based on user roles, which Route Guard should you implement?

  • CanActivate
  • CanActivateChild
  • CanDeactivate
  • CanLoad
To restrict loading of modules based on user roles in a lazy-loaded scenario, you should implement the CanLoad guard. It allows you to check conditions before the module is loaded, ensuring that only authorized users can access certain parts of the application.
Add your answer
Loading...

Leave a comment

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