I am trying to get the current url in emberJS, but I cannot. I'm doing it:
App.Route = Ember.Route.extend(Em.I18n.TranslateableProperties, { actions: { didTransition: function (transition) { this._super(); console.log(window.location.href); console.log(this.get('router.url')); } } });
I used to use didTransition because I need to know the current URL when all the elements are loaded. For example: If I am on the home page (/ home) and go to the contact page (/ contact page), I want to find out the URL / contact page.
If I use window.location.href , but not always. I thought that didTransition was called when everything else was finished, but no.
Why?
Thanks in advance
source share