export directive RouterLink
export directive RouterLink
exported from angular2/router defined in angular2/src/router/router_link.ts (line 6)
The RouterLink directive lets you link to specific parts of your app.
Consider the following route configuration:
When linking to this User
route, you can write:
RouterLink expects the value to be an array of route names, followed by the params
for that level of routing. For instance ['/Team', {teamId: 1}, 'User', {userId: 2}]
means that we want to generate a link for the Team
route with params {teamId: 1}
,
and with a child route User
with params {userId: 2}
.
The first route name should be prepended with /
, ./
, or ../
.
If the route begins with /
, the router will look up the route from the root of the app.
If the route begins with ./
, the router will instead look in the current component's
children for the route. And if the route begins with ../
, the router will look at the
current component's parent.
Selectors
[routerLink]
Inputs
router-link
bound to RouterLink.routeParams
target
bound to RouterLink.target
Constructor
constructor(_router: Router, _location: Location)
constructor(_router: Router, _location: Location)
Not Yet Documented
Members
visibleHref : string
visibleHref : string
Not Yet Documented
target : string
target : string
Not Yet Documented
isRouteActive : boolean
isRouteActive : boolean
Not Yet Documented
routeParams
routeParams
Not Yet Documented
onClick() : boolean
onClick() : boolean
Not Yet Documented