2
首先,道歉我没有一个示例来显示。目前的情况是我使用的UI路由器和我有3个不同的控制器,每个在同一页上的状态名称'结果'的意见。即头部,内容和侧边栏。
但是,当我呼叫$state.is('result')
时,只有1个控制器(内容)返回true
。我也试过$state.includes('result')
。
当我登录了$state
只,所有3的状态对象是否显示在$state.current.name
同样正确\result
,但是,如果我尝试直接登录$state.current
,该name
他们的2变为空白。
我试着交换视图的顺序,但只有内容返回true
。
我多次阅读文档,但找不到原因。请帮忙!
.state('result', {
url: '/result',
views: {
'headView' : {
templateUrl: 'modules/core/templates/head.html'
},
'contentView' : {
templateUrl: 'modules/core/templates/content.html'
},
'sidebarView' : {
templateUrl: 'modules/core/templates/sidebar.html'
},
}
})