angularjs - ngRouter/uiRouter preserve controllers when changing view -


is there anyway preserve route controllers in angular when using routing? everytime change view, old controller destroyed , new 1 created, wondering if there way preserve existing controller.

so right now, if user started complete form, navigates away , comes original view, controller has been re-created , users form data lost. if controller preserved user pick again.

i know real solution here either have parent controller current model or service retain state, wondering if else had similar experience wanted preserve view controller?

if want behavior think have somehow store information of uncompleted form in service. don't think can change behavior of how angular destroys , creates new instances of controllers when navigating through application. seems me fundamental solution in angular.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -