angular ui - AngularJS nested views -
hi there don't know how show example navbar , real content route. stateprovider looks this:
.state('panel', { abstract: true, views: { // child views defined here (absolutely named) 'navbar': { templateurl: 'packages/admin/app/partials/panel/navbar.html' } } }) .state('panel.dashboard', { url: '/dashboard', templateurl: 'packages/admin/app/partials/panel/index.html', controller: 'adminctrl' });
my main html file looks this:
<body> <div ui-view="navbar"></div> <div class="container"> <div ui-view></div> </div> <!-- /container --> </body>
and after going route /dashboard see navbar.html content generated in *ui-view="navbar" don't see index.html' main ui-view. how manage ?
i'm not sure why you're trying use multiple views when seems better usage case plain nested views. i'd try model code instead after nested views example: https://github.com/angular-ui/ui-router#nested-states--views
Comments
Post a Comment