angular router has three Router directives

RouterLink,

RouterLinkActive

RouterOutlet

when a RouterLink is active, it will add the class="active" to the <a

for example when a link is active it will look something like this:

<a _ngcontent-lbf-0="" routerlink="player/" routerlinkactive="active" ng-reflect-router-link="player/" ng-reflect-router-link-active="active" ng-reflect-href="/player" href="/player" class="active">player</a>

for more information about routerLink go to the angular official documentation:

https://angular.io/docs/ts/latest/guide/router.html#!#router-link