Unsaved-changes-alert in forms

Dear all,

i’m new to ember and have to make a offer.

In common web-applications: If you fillup a form and then click a link without saving the form, the browser would say “are you sure to leave the page?”.

Is it possible to have a message if the user leaves a form without saving, in Ember? Or, to integrate such routine in the application route, by example, once for all forms? Or, having a method that checks if the form goes to the background?

Best regards, Christian

This covers how to stop people from leaving a route until they’ve confirmed:

That takes care of navigation within your app. If you also want to stop people from leaving the app entirely and going to another website, you can use beforeUnload. You can setup the beforeUnload listener from inside your application route so that it happens once when the app starts up.

Thanks, Edward!

thats what i was looking for.