RouterLink

Stable

Directive

What it does

Lets you link to specific parts of your app.

How to use

Consider the following route configuration: [{ path: 'user/:name', component: UserCmp }]

When linking to this user/:name route, you can write: <a routerLink='/user/bob'>link to user component</a>

Class Overview

class RouterLink {
constructor(router: Router, route: ActivatedRoute)

queryParams : {[k: string]: any}
fragment : string
preserveQueryParams : boolean
preserveFragment : boolean
skipLocationChange : boolean
replaceUrl : boolean
routerLink 
onClick() : boolean
urlTree : UrlTree

}

Selectors

:not(a)[routerLink]

Class Description

Constructor

constructor(router: Router, route: ActivatedRoute)

Class Details

exported from @angular/router/index, defined in @angular/router/src/directives/router_link.ts