{"action":"created","issue":{"url":"https://api.github.com/repos/kadirahq/flow-router/issues/158","labels_url":"https://api.github.com/repos/kadirahq/flow-router/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/kadirahq/flow-router/issues/158/comments","events_url":"https://api.github.com/repos/kadirahq/flow-router/issues/158/events","html_url":"https://github.com/kadirahq/flow-router/issues/158","id":87382442,"number":158,"title":"Prevent navigation?","user":{"login":"peterchoo","id":5271469,"avatar_url":"https://avatars.githubusercontent.com/u/5271469?v=3","gravatar_id":"","url":"https://api.github.com/users/peterchoo","html_url":"https://github.com/peterchoo","followers_url":"https://api.github.com/users/peterchoo/followers","following_url":"https://api.github.com/users/peterchoo/following{/other_user}","gists_url":"https://api.github.com/users/peterchoo/gists{/gist_id}","starred_url":"https://api.github.com/users/peterchoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterchoo/subscriptions","organizations_url":"https://api.github.com/users/peterchoo/orgs","repos_url":"https://api.github.com/users/peterchoo/repos","events_url":"https://api.github.com/users/peterchoo/events{/privacy}","received_events_url":"https://api.github.com/users/peterchoo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-11T15:21:16Z","updated_at":"2015-12-03T22:53:30Z","closed_at":"2015-06-11T16:44:40Z","body":"Hi all,\r\n\r\nBeen having a conversation about Routers with a couple of people, and one of the things we were discussing was the lack of clear way to prevent a navigation from taking place.\r\n\r\nImagine a situation where you have a form for creating a blog post, you've filled in quite a lot of it.  In the application when there is text in any of the form fields let's say a Session var gets set to say \"editing in progress\".  You then click a link (be it by accident or otherwise), and you want your application to show a confirmation modal informing the user that if they carry on their work will be lost.\r\n\r\nHow can we do this in Flow Router?  \r\n\r\nI'm aware that we could have some kind of caching operation to save the form data, and when they come back to the route say \"this was saved from before, would you like to use it?\", but think that having a way to hook into the navigation and say \"if this Session var is true, show this modal\"."},"comment":{"url":"https://api.github.com/repos/kadirahq/flow-router/issues/comments/161814525","html_url":"https://github.com/kadirahq/flow-router/issues/158#issuecomment-161814525","issue_url":"https://api.github.com/repos/kadirahq/flow-router/issues/158","id":161814525,"user":{"login":"space-alien","id":7103159,"avatar_url":"https://avatars.githubusercontent.com/u/7103159?v=3","gravatar_id":"","url":"https://api.github.com/users/space-alien","html_url":"https://github.com/space-alien","followers_url":"https://api.github.com/users/space-alien/followers","following_url":"https://api.github.com/users/space-alien/following{/other_user}","gists_url":"https://api.github.com/users/space-alien/gists{/gist_id}","starred_url":"https://api.github.com/users/space-alien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/space-alien/subscriptions","organizations_url":"https://api.github.com/users/space-alien/orgs","repos_url":"https://api.github.com/users/space-alien/repos","events_url":"https://api.github.com/users/space-alien/events{/privacy}","received_events_url":"https://api.github.com/users/space-alien/received_events","type":"User","site_admin":false},"created_at":"2015-12-03T22:53:30Z","updated_at":"2015-12-03T22:53:30Z","body":"@peterchoo Please see my comments on #318 which may be relevant."}}