Router-link directive: - Router-link directive is used to link a specific part of your applications.
<router-link> </router-link>
Example as,
<ul class='nav navbar-nav'> <li [routerLinkActive]="['link-active']"> <a [routerLink]="['/login']"> <span class='glyphicon glyphicon-Login'></span> Login </a> </li> <li [routerLinkActive]="['link-active']"> <a [routerLink]="['/registration']"> <span class='glyphicon glyphicon-Register'></span> Register </a> </li> <li [routerLinkActive]="['link-active']"> <a [routerLink]="['/Billing']"> <span class='glyphicon glyphicon-Billing'></span> Billing </a> </li> </ul>
Angular2 - Routing Concepts
What is Routing in Angular 2? | What is Routes? |
What is Router Imports? | What is RouterOutlet? |
Is it possible to have a multiple router-outlet in the same template? | What is RouterLink? |