【发布时间】:2019-11-13 11:35:49
【问题描述】:
我有以下路线:
const routes: Routes = [
{
path: ':product/new',
children: [{
path: 'std/:country',
component: SignUpComponent,
data: {
animation: 'animate',
segment: 'std',
country: ':country'
}
}, {
path: 'exp/:country',
component: PaymentComponent,
data: {
animation: 'animate',
segment: 'exp'
}
}
}
]
country: ':country' 是向SignUpComponent 传递动态 url 数据的正确方法吗?如果是,我如何在我的SignUpComponent Component 中使用这些数据?
【问题讨论】:
标签: angular typescript routing