我有一个 $state 配置如下:
.state('app.subjects.current', {
abstract: true,
url: "/:subjectId",
template: "<div ui-view />",
ncyBreadcrumb: {
skip: true
}
})
.state('app.subjects.current.home', {
url: '/home',
templateUrl: "assets/src/subject/subjectHome.html",
resolve: loadSequence('subjectHomeCtrl'),
ncyBreadcrumb: {
label: 'View'
},
string: 'sidebar.nav.pages.SUBJECTHOME'
})
我使用 $state.go('app.subjects.current.home', {subjectId: '999'}); 转换到这个状态。
url 在地址栏中显示为“<a href="http://localhost:12253/#/app/subjects//home?subjectId=999" rel="nofollow">http://localhost:12253/# /app/subjects//home?subjectId=999”。它实际上应该是“<a href="http://localhost:12253/#/app/subjects/999/home" rel="nofollow">http://localhost:12253/#/app/subjects/999 /家”。
谢谢你的帮助。