sounds like something abstract state can fix.
changing your “authenticated” state to an abstract parent and attaching a controller to it can allow you to convert axx data to child states. You can also simply create a separate controller for your data and reset the ng-controller to the body tag.
If you are still having problems, how do you use LocalStorage to save the required data?
Update2 Found a post and changed plnk to update the ng model as I type, but I understand why the OP wants a popup.
Edit Example Plnkr General Status
I will try to find a good example , but there is some pseudo code here.
.state('authenticated', { abstract: true, url: '/authenticated', controller: 'AuthStateController', template: '<p>We are now authenticated</p>' + '<a ui-sref="authenticated.home">home</a>' + '<a ui-sref="authenticated.statistics">statistics</a>' + '<a ui-sref="authenticated.popup">Popup!</a>' + '<div ui-view></div>' + '<div ui-view="popup"></div>' })
I believe with or without {abstract: true} your popup state must have access to data inside the "AuthStateController". Solutions can be a redundant solution, but they can give you an idea of how to use controller data more efficiently. If all else fails, create a data processing service.
.state('authenticated.popup', { url: '^/popup', views: { popup: { resolve: { ctrl: 'AuthStateController', data: function(ctrl) { return ctrl.data_for_popup; } } template: '<div id="popup"><p>popup is up</p>' + '<a ui-sref="authenticated.home">close</a>' + '</div>' } } })
source share