如何在 ember 应用程序之外检测路由更改(# 或 popstate)?我试过这个但没有运气:他们从不开火
window.onhashchange = function locationHashChanged() {
console.log(location.hash);
};
window.addEventListener('popstate', function locationHashChanged(e) {
console.log(e.location);
});