I have a structure like this:
<div ui-view="main">
<!-- content populated here by AngularJS ui-router -->
<aside ui-view="sidebar">
<!-- content populated here by AngularJS ui-router -->
</aside>
</div>
I want to be able to define the templates in the main state like below instead of having to manage it in the child state.
.state('state1', {
url: '/',
views: {
'main': {
templateUrl: '/modules/blog/partials/index.html',
controller: 'BlogController'
},
'sidebar': {
templateUrl: '/modules/core/partials/sidebar.html'
}
}
});
I'd like the ui-view named sidebar
to not be a child state of main
and be populated by the main
state's views object instead of by a child state's templateUrl field. How can I do that?