Interview Questions

1. What do you understand by the RouterLinkActive?

The RouterLinkActive is a directive used to toggle CSS classes for active RouterLink bindings based on the current RouterState. i.e., the Router will add CSS classes when this link is active and remove them when the link is inactive.

For example, you can add them to RouterLinks as follows:

<h1>Angular Router</h1>  


  <a routerLink="/todosList" routerLinkActive="active">List of todos</a>  

  <a routerLink="/completed" routerLinkActive="active">Completed todos</a>  



By Md Riyazuddin 2 0
Is this helpful? Yes No

Submit an interview question

Submitted questions and answers are subject to review and editing, and may or may not be selected for posting, at the sole discretion of w3Sniff.

Get Started


Leave a Comment

Check out more interview questions

Based on your skills

MS SQL Server

1636431 1720 22 859


41382 92 0 46


33555 72 1 36