What is the primary purpose of the RouterOutlet directive in Angular?

  • To define routes in the application
  • To display the contents of routed components
  • To define route guards for route protection
  • To configure authentication settings
The primary purpose of the RouterOutlet directive in Angular is to display the contents of routed components. It acts as a placeholder where the routed component's view is rendered when the corresponding route is activated. It is an essential part of Angular routing and ensures that the correct component is displayed based on the route configuration. The other options do not accurately describe the purpose of RouterOutlet.
Add your answer
Loading...

Leave a comment

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