I have a specific structure set up like this:
<div ui-view="main">
<!-- content is dynamically loaded here by AngularJS ui-router -->
<aside ui-view="sidebar">
<!-- sidebar content is also populated by AngularJS ui-router -->
</aside>
</div>
My goal is to define the templates in the main state directly, rather than managing them within the child state.
.state('state1', {
url: '/',
views: {
'main': {
templateUrl: '/modules/blog/partials/index.html',
controller: 'BlogController'
},
'sidebar': {
templateUrl: '/modules/core/partials/sidebar.html'
}
}
});
I'm looking for a way to have the ui-view named sidebar
independent of being a child state of main
, and have its content populated by the main
state's views object rather than through a child state's templateUrl field. Is there a solution for achieving this?