You are developing an admin panel with multiple sections (e.g., Users, Products, Orders) and want to ensure that only authenticated administrators can access these sections. How would you use Route Guards to protect these sections?
- Apply CanLoad Route Guards to sections
- Create a single global Route Guard for admin access
- Implement a shared authentication service
- Use CanActivate Route Guards for each section
To protect admin sections and ensure authentication, you should use CanActivate Route Guards for each section. These guards check if the user is authorized to access each section.
Loading...
Related Quiz
- You are building a survey application where the questions change based on the user's previous responses. Which feature of Angular forms would be best suited to create this kind of dynamic behavior?
- The _____ decorator is used to mark a class as available to be provided and injected as a dependency.
- How do you define a feature module in Angular?
- Which tool is commonly used for executing unit tests in Angular applications?
- When testing Angular pipes, it is crucial to test not only the transformation but also the _______ of the output.