mercredi 9 octobre 2019

using location in ember (how to lookup)

Trying to use the Location class with Ember 3.4.

How to instantiate/lookup/inject the Location class in my routes?

Writing this in a route file doesn't work:

import Location from '@ember/routing/location';

[...]

//in some action method
console.log(Location.getURL());

[...]

The result is:

getURL is not a function



Aucun commentaire:

Enregistrer un commentaire