【发布时间】:2017-03-04 19:18:03
【问题描述】:
哇
this.router.navigate(['/services', {outlets: {'servicelistright': ['servicelist']}}]);
如果我在下面的 url 我得到使用下面的查询参数:
http://localhost:4200/#/services/(servicelistright:servicelist;type=11)
this.route.params.map(params => params['type'])
.subscribe(type => { console.log('stupid',type) });
嗯,我觉得太棒了..哇太棒了......
但是到底如何添加查询参数呢?
1) 使用 router.navigate
this.router.navigate(['/services', {outlets: {'servicelistright': ['servicelist']}}]);
在哪里添加 type=11???
或者我的路由器链接
<a md-raised-button routerLinkActive="['active']" [routerLink]="['/services']" ">Raised button</a>
【问题讨论】: