title: How to get previous state from Router_Cancel in ngrx?
body: <p>I was trying to restrict the user from navigating away from the current page by using <code>CanDeactivate</code> (if form is dirty and not saved). By the time we click on any link, <code>Router_Navigation</code> 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), <code>Router_Cancel</code> event is being called, but the current router state is not getting updated (it’s still pointing to other page).</p>
  
  <p>I saw this in <code>ngrx</code> documentation: </p>
  
  <blockquote>
    <p>ROUTER_CANCEL and ROUTER_ERROR contain the store state before the
    navigation. Use the previous state to restore the consistency of the
    store.</p>
  </blockquote>
  
  <p>Can someone please help me on how to get previous state from <code>Router_cancel</code> Action.</p>
  
  <p>Thanks</p>