Working with Routes in Angular

 <a class="button" routerLink="/A-list" routerLinkActive="activebutton">A Center</a> | 
 <a class="button" routerLink="/B-list" routerLinkActive="activebutton">B</a> 

Which of the following interferences can be made with respect to the code snippet given above?

1. As you click one of the buttons, the style for that button updates automatically, identifying the active component to the user.

2. By adding the routerLinkActive directive, you inform your application to apply a specific CSS class to the active route.

  1. Only 1
  2. Only 2
  3. Both 1 and 2
  4. Neither 1 nor 2

Related Posts

Close Bitnami banner