-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Labels
Description
In Ember 3.12 the following code would report the current URL of the application:
class MyRoute extends Route {
@service router;
activate() {
super.activate(...arguments);
console.log('here you are:', this.router.currentURL);
}
}
In Ember 3.15 this will always report null
. This is expected to work per RouterService#currentURL. Cursory investigation shows that both currentRouteName
nor currentRoute
are set either.
Curiously the RouterService
reports the correct URL when used within a Component.
Sample application: https://github.com/jherdman/where-art-thou. Note that the console will always log a null
URL, whereas the component correctly reports the URL.