title: Ember.js routing - conditionally prevent route/state change
body: <p>I'm trying to figure out how to prevent or pause a route change. For my edit screens, if the user navigates away (back button or some other mechanism) when they have unsaved changes, I would like to prompt them to make sure they want to leave the page. Very similar to <code>window.onbeforeunload</code>, but via the router.</p>
  
  <p>The statechart in previous versions of Ember gave you a transition object that you could use. It seems that in ember-latest, this is no longer the case. So what's the best way to go about this?</p>
  
  <hr>
  
  <p><strong>EDIT:</strong></p>
  
  <p>The above question is old and the answers listed are dated. Ember now has a native way to handle this. See docs: <a href="http://emberjs.com/guides/routing/preventing-and-retrying-transitions/" rel="nofollow">http://emberjs.com/guides/routing/preventing-and-retrying-transitions/</a></p>