-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Description
I was trying to restrict the user from navigating away from the current page by using CanDeactivate (if form is dirty and not saved). By the time we click on any link, Router_Navigation event is getting called and it is updating the router state in store and if I cancel the page navigation on modal pop up (from can deactivate), Router_Cancel event is being called, but the current router state is not getting updated (it’s still pointing to other page).
I saw this in ngrx documentation:
ROUTER_CANCEL and ROUTER_ERROR contain the store state before the navigation. Use the previous state to restore the consistency of the store.
Can someone please help me on how to get previous state from Router_cancel Action.
Thanks.
trumbitta, PsychicCat, jwerts and george3447
Metadata
Metadata
Assignees
Labels
No labels