Actually I think this post answers my question: http://weblogs.asp.net/dwahlin/cancelling-route-navigation-in-angularjs-controllers
On Tuesday, July 1, 2014 10:59:28 AM UTC+1, Stephen Adams wrote: > > Hi, > > I'm working on a application that has various forms and I want to make > sure that the user saves the details added to a form before moving to a new > view. > > I was thinking of adding a flag to the controller called 'formStatus' and > have that set to 'unsaved' until the user clicks the save button. Is there > a way in Angular to check if the has requested that a new view is to be > loaded? If so I was thinking of using this of capturing a view change > request to check the value of the formStatus and if it still unsaved > display a warning messsage to the user (and stopping the view change while > that formStatus is still unsaved). > > Is this possible or is there another/better way? > > Stephen > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
