documentation for router change event says that navigation can be canceled with preventDefault
but i want to ask user before leaving current view if is ok to leave unsaved changes.
can be done using promises ?
2 Answers, 1 is accepted
0
Accepted
Boyan Dimitrov
Telerik team
answered on 13 Feb 2017, 07:57 AM
Hello,
I am afraid that the change event of the router does not offer promises. A possible solution for your case would be to cancel with preventDefault method and navigates (using the navigate method) if needed.