I am using angular6 and would like to warn the user that there are unsaved changes in the form (update) before the user change screen. My form was created using formBuilder.
1 Answers
0
votes
You can do it using angular route-guards. As it is big topic i would suggest, please take a look into following: https://angular.io/guide/router#milestone-5-route-guards
CanDeactivate
is your friend. Here: angular.io/api/router/CanDeactivate#candeactivate – Faisal