vendredi 20 mars 2015

How can you listen to ember route changes?

How can you detect route changes (# or popstate) outside an ember app? I've tried this but not had any luck: they never fire



window.onhashchange = function locationHashChanged() {
console.log(location.hash);
};
window.addEventListener('popstate', function locationHashChanged(e) {
console.log(e.location);
});




Aucun commentaire:

Enregistrer un commentaire