我在Angular 4应用程序中使用路由器链接并尝试路由到以下
[routerLink]="['/CostofOwnership/ownership-result', cons.name]
但是这是它转到
的网址为什么在开头添加巨大的字符串?
编辑:
const routes: Routes = [
{
path: '',
data: {
title: 'ownership-cost'
},
children: [
{
path: 'ownership-result-compare',
component: OwnershipResultCompareComponent,
data: {
title: 'Ownership-Form'
}
},
{
path: 'ownership-form/:typeOf',
component: OwnershipFormComponent,
data: {
title: 'Ownership-Form'
}
},
{
path: 'ownership-form-admin/:uid/:typeOf',
component: OwnershipAdminComponent,
data: {
title: 'Ownership-Form-Admin'
}
},
{
path: 'ownership-result/:typeOf',
component: OwnershipResultComponent,
data: {
title: 'Ownership-Result'
}
},
{
path: 'ownership-result-admin/:uid/:typeOf',
component: OwnershipResultAdminComponent,
data: {
title: 'Ownership-Result-Admin'
}
},
{
path: 'ownership-question',
component: OwnershipQuestionComponent,
data: {
title: 'Ownership-Question'
}
},
{
path: 'ownership-inform',
component: OwnershipInformComponent,
data: {
title: 'Ownership-Information'
}
},
]
}
]