【发布时间】:2016-11-30 05:58:34
【问题描述】:
<a href="#"
[routerLink]="[isTrue?'/location-1':'/location-2', '']"
[queryParams]="{id:loc.id,l:'loc'}">
这里当isTrue 的值为true
/location-1/?id=1&l=loc
但是当isTrue 的值为false 时,我需要
/location-2/?id=1&l=loc2&idL=2
那么如何有条件地修改参数呢?
【问题讨论】:
标签: angular routeparams