With Luke Melia, answer that you don’t make any breaks to prevent memory leaks without causing problems when using the browsers return button.
If this is necessary globally for your application, and you want to use this event only to call one function, then good. But if you want to call () when you leave the route (which you must break when you don't need it), you will cause errors with ember. In particular, when trying to use the return button to the browser.
A better approach would be to use an event bus and a proxy server for an event that would not cause problems with the back button.
$(window).on('hashchange', function(){
Then, when you want to listen to the hash changes, you listen to your custom event, and then tear it off when it is not needed.
Enter route A:
$(window).on('yourCustomEventName', function(){
Leave route A:
$(window).off('yourCustomEventName');
Enter route B:
$(window).on('yourCustomEventName', function(){
Leave route B:
$(window).off('yourCustomEventName');
source share