fix(router): add segmentPath to the link DSL

This commit is contained in:
vsavkin
2016-08-04 17:19:23 -07:00
committed by Alex Rickabaugh
parent 99989f5d3f
commit 4f17dbc721
5 changed files with 52 additions and 28 deletions

View File

@ -220,9 +220,14 @@ export class Router {
* // create /team/33;expand=true/user/11
* router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);
*
* // you can collapse static fragments like this
* // you can collapse static segments like this (this works only with the first passed-in value):
* router.createUrlTree(['/team/33/user', userId]);
*
* If the first segment can contain slashes, and you do not want the router to split it, you
* can do the following:
*
* router.createUrlTree([{segmentPath: '/one/two'}]);
*
* // create /team/33/(user/11//aux:chat)
* router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);
*