RouterLink以年月和日为参数

时间:2017-07-13 14:25:35

标签: angular

我需要在angular2

中使用以下网址
domain.com/2017-08-09/test
domain.com/2017-08-09
domain.com/2017-08
domain.com/2017

{ path: '', component: HomeComponent },
{ path: 'test/:year-:month-:day/:slug', component: DetailComponent },
{ path: 'test/:year-:month-:day', component: DayComponent },
{ path: 'test/:year-:month', component: MonthComponent },
{ path: 'test/:year', component: YearComponent }

如果可以,我可以在routerLink上使用它们吗?

0 个答案:

没有答案