A client asks for a feature where certain parts of the application should only be accessible to authenticated users. Which feature of Angular would you use to implement this?
- Angular Directives
- Data Binding
- Dependency Injection
- Route Guards
In Angular, you can implement access control for certain parts of the application by using Route Guards. Route Guards allow you to protect routes based on conditions, such as whether the user is authenticated. Data Binding, Dependency Injection, and Angular Directives are not specifically designed for access control.
Loading...
Related Quiz
- How can you prevent a particular component from being checked during the entire change detection cycle?
- For a router link to get an "active" CSS class when the link's route is active, you can use the ________ directive.
- In an e-commerce application, you want to ensure that product details fetched from the server are not requested again for a certain period. Which technique would be effective for this scenario?
- How can you provide a custom Value Accessor for a form control in Angular?
- Which method of ViewContainerRef allows you to insert a component?