I am blocked with this,
In Angular 2, I need to block any user click event, even browser refresh if the form in the page is dirty
Could you help me with ideas?
It seems you are looking for canDeactivate
It allows you to block routing away. You would need a shared service where you update the forms dirty state so that the guard can access it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With