Angular Interview questions


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

What are router links?

The RouterLink is a directive on the anchor tags that gives the router control over those elements. Since the navigation paths are fixed, you can assign string values to the router-link directive as follows,

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

 




Next 5 interview question(s)

1
What is router outlet?
2
What are the router imports?
3
What is the purpose of base href tag?
4
Give an example for attribute directives?
5
How do you create directives using CLI?