Confirming save before changing view

19 views
Skip to first unread message

Stephen Adams

unread,
Jul 1, 2014, 5:59:28 AM7/1/14
to ang...@googlegroups.com
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

Stephen Adams

unread,
Jul 1, 2014, 6:09:27 AM7/1/14
to ang...@googlegroups.com
Reply all
Reply to author
Forward
Message has been deleted
0 new messages