Angular Interview questions


Total available count: 96
Subject - JavaScript Frameworks
Subsubject - Angular

What are active router links?

RouterLinkActive is a directive that toggles 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 when the link is inactive. For example, you can add them to RouterLinks as follows,

<h1>Angular Router</h1>
<nav>
  <a routerLink="/todosList" routerLinkActive="active">List of todos</a>
  <a routerLink="/completed" routerLinkActive="active">Completed todos</a>
</nav>
<router-outlet></router-outlet>

 




Next 5 interview question(s)

1
What are router links?
2
What is router outlet?
3
What are the router imports?
4
What is the purpose of base href tag?
5
Give an example for attribute directives?