2017-07-25 48 views

回答

0

任何examle这可能是占位符如/:title,与您所做的相同id

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

要在上面的URL上重定向,可以使用带有适当参数的routerLink指令。

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