I am upgrading an existing angular app to all the latest versions of angular (v1.2.13), ui-router (v0.2.8), and ui-bootstrap (v0.10.0).
I have nested views that have multiple named views. One of the named views has tabs inside of it. I used to be able to set ui-views
within each tab, but that no longer is working. If I don't use the tabs then the named views render correctly.
I have created a plunkr to show what I'm seeing.
Here is my state configuraiton. _split.html
has 3 named views: TOP
, MIDDLE
, and BOTTOM
. TOP
and MIDDLE
both have named views LEFT
and RIGHT
. TOP
has tabs and does not render the views LEFT
or RIGHT
. MIDDLE
has the same named views and they render correctly.
$stateProvider
.state("foo", {
abstract: true,
url: "/foo",
templateUrl: '_split.html',
})
.state("foo.view", {
abstract: true,
url: '',
views: {
'TOP': {
template: '_tabs.html'
},
'MIDDLE': {
templateUrl: '_tabs2.html'
},
'BOTTOM': {
template: '<h2>Bottom</h2>'
}
},
})
.state("foo.view.tabs", {
url: '',
views: {
'LEFT': {
template: '<h3>Left</h3>'
},
'RIGHT': {
template: '<h3>Right</h3>'
}
}
})
Is there any way to render ui-view within tabs?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…