In index.html I have the ng-view where the HTML content is loaded:
<body>
<div ng-include src="'view/sidebar.html'" class="sidebar sidebar-left" toggleable parent-active-class="sidebar-left-in" id="mainSidebar"></div>
<div ng-include src="'view/sidebarRight.html'" class="sidebar sidebar-right" toggleable parent-active-class="sidebar-right-in" id="rightSidebar"></div>
<div class="app">
<ng-view class="app-content"></ng-view>
</div>
</body>
In the same index.html I make the include of 2 files (sidebar.html and sidebarRight.html) according to the code above, however these files should only appear after login.
In the application, after login the user is redirected to the dashboard.html, see the route provider:
$routeProvider.
//...
.when('/dashboard', {
title: 'Dashboard',
templateUrl: 'view/dashboard.html',
controller: 'authCtrl'
})
//...
I have seen that it is not allowed to have more than one ng-view, so how do I solve the problem?
I have tried to put the includes inside the dashboard.html, however it would have to duplicate for several pages and in the template I am using, it is even necessary to be outside the "app" div.