0
<a href="#"
[routerLink]="[isTrue?'/location-1':'/location-2', '']"
[queryParams]="{id:loc.id,l:'loc'}">
這裏時isTrue
值true
/位置-1 /?ID = 1 & L = LOC條件在queryParams angular2
但當isTrue
價值false
,我需要
/location-2 /?id = 1 & l = loc2 & idL = 2
那麼如何有條件地修改參數呢?