我有以下状态。
.state('workflow2', {
abstract: true,
url: '/workflow/:workflow_id',
views: {
'main': {
templateUrl: 'pages/templates/view_workflow.html',
controller: 'view_workflow'
},
},
resolve: { authenticated: authentication }
})
.state('workflow2.view', {
url: '/view',
templateUrl: 'pages/templates/workflow/view.html',
controller: 'workflow.view',
resolve: { authenticated: workflow_item_auth }
})
我希望能够将用户重定向到:
/工作流/的:workflow_id /视图
我尝试了以下操作,但由于启用了abstract :true
,因此一直收到以下错误:
错误:无法转换为抽象状态'workflow2'
$state.go('workflow2', {workflow_id: id});
$state.go('workflow2.view', {workflow_id: id});
有谁知道如何将用户重定向到我的“查看”状态?
答案 0 :(得分:0)
试试这个
.state('workflow2.view', {
url: '/:workflow_id/view',
templateUrl: 'pages/templates/workflow/view.html',
controller: 'workflow.view',
resolve: { authenticated: workflow_item_auth }
})