Setup is using Angular v1.5.8, and ui-router v0.3.1 . My root view has several named sections (ive removed a number of them for brevity). It looks like this
<section id="container">
<div id="main">
<div id="overlay">
<section id="overlay__content" ui-view="overlay"></section>
</div>
<div id="content">
<section id="content__content" ui-view="content"></section>
</div>
</div>
</section>
My state controller looks like this
$stateProvider
.state('app',{
url: '/',
abstract: true,
views: {
'overlay': {
templateUrl: partialsUrl + 'main.overlay.html', // <-- content below
controller: 'OverlayController',
controllerAs: 'vm'
}
}
})
.state('app.foo', {
url: 'foo',
views: {
'content@': {
templateUrl: partialsUrl + 'foo.main.html',
controller: 'FooController',
controllerAs: 'vm'
}
}
})
.state('app.foo.add', {
url: '/add',
views:{
'content@overlay':{ // <-- DOES NOT WORK
templateUrl: partialsUrl + 'foo.add.html',
controller: 'FooAddController',
controllerAs: 'vm'
}
}
})
My overlay view template (main.overlay.html
) looks like this
<a class="close">×</a>
<div ui-view="content"></div> <!-- <-- LOAD CONTENT INTO HERE -->
What Im trying to do is when the app.foo.add
state is initiated to load content into the content
section of the overlay
root named view. I can access the root content view using content@
successfully as described here. However, there doesnt seem to be any documentation about traversing into a states's view deeply. Ideally i would imagine i would want something like content@app(overview)
(assuming that ()
allowed you to select a named view and then go into it, or perhaps content@app@overview
. Neither of which work.
Any suggestions for a solution or something fundamental that im missing would be greatly appreciated