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, tabIndex: string, renderer: Renderer, el: ElementRef)

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

}

Selectors

:not(a)[routerLink]

Class Description

Constructor

constructor(router: Router, route: ActivatedRoute, tabIndex: string, renderer: Renderer, el: ElementRef)

Class Details

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