2017-07-25 45 views

回答

0

任何examle這可能是佔位符如/:title,與您所做的相同id

RouterModule.forChild([ 
    { path: 'car/:title/:id', component: CarDetailComponent } 
]) 

要在上面的URL上重定向,可以使用帶有適當參數的routerLink指令。

[routerLink]="['car', title, id]"