我有一個超鏈接,我需要在Angular 4中創建一個路由器鏈接。我對url有很多部分,其中一部分是數組。我不知道如何讓數組分割成爲routerlink數組的一部分。RouterLink陣列
藉此人爲的例子:
[routerLink]="['/customers', customerid, orderid, arrayofints, anotherint]"
我想路由器看起來像這樣其中客戶id = 10,爲了= 500,arrayofints = [1,2,3],anotherint = 888
"/customers/10/500/1/2/3/888"
我結束了這樣的事情,而不是:
"/customers/10/500;0=1;1=2;2=3/888"
如果你傳播數組:'orderid,... arrayofints,anotherint',會怎麼樣?啊,不:解析器錯誤:意外的令牌。列' – jonrsharpe
@jonrsharpe否定的,解析器錯誤:意外的令牌。在列36 – Darthg8r
如果加入arrayofints會怎麼樣? – Nick