Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

How I can "catch" redirect event to show prompt/confirm modal? #828

Open
alekbarszczewski opened this issue Aug 22, 2014 · 0 comments
Open

Comments

@alekbarszczewski
Copy link
Contributor

In almost every view in my app user may edit some content and then click "save" to sync edited data to server. If user edits some data, does not save them and redirects to another page/view/controller via HTML link or Chaplin.utils.redirectTo method, then I would like to show a modal thats says something like "Hey you didn't save your data - are you sure you want to leave this page?".

Where and how I can catch "redirect" event and prevent it when neccessery?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant