What would you use to ensure that a route is only accessible to authenticated users?
- CanActivate guard
- Route event emitter
- Route resolver
- Router outlet
To ensure that a route is only accessible to authenticated users, you would use a CanActivate guard. CanActivate guards can be used to implement authentication and authorization checks before allowing access to a route.
Loading...
Related Quiz
- The [style.color] syntax in an Angular template is an example of _____ binding.
- Which Angular module must be imported to use template-driven forms?
- You are building a large e-commerce application and you want to ensure that certain modules, like the Checkout module, are only loaded when the user navigates to that section. How would you achieve this?
- What language is used to write E2E tests in Protractor?
- How would you implement cross-field validation in a reactive form?