My application utilizes 2 ui-views to display content - one for the friendlist and the other for a specific view:
<div class="container-fluid h100">
<div ui-view class="h100">
</div>
<div ui-view="connected">
</div>
</div>
The ui-view connected is only shown when the user is connected to the app.
However, I am facing an issue where all views are reloaded, including the friendlist, when I change the URL. I am looking for a way to prevent this behavior. Any suggestions? Perhaps restructuring the code could help.
The state configuration is as follows:
.state('homepage', {
url: '/homepage',
views: {
"connected" : {
templateUrl : './src/friendlist.html',
controller : 'NavRightController'
},
"" : {
templateUrl : './src/homepage.html',
controller: 'HomePageController',
}
}
})
.state('settings', {
templateUrl: './src/settings.html',
controller: 'SettingsController',
url: '/settings',
views: {
"connected" : {
templateUrl : './src/friendlist.html',
controller : 'NavRightController'
},
"" : {
templateUrl : './src/homepage.html',
controller: 'HomePageController',
}
}
})