vendredi 29 septembre 2017

How to use an Ember.getOwner(this).lookup('application:main') result

As the title say, I have some problem understanding what does this call return.
This is how I am using it:

fetchEngines()
    {
        let object = Ember.getOwner(this).lookup('application:main').engines;
        console.log(object);
    }

And it return me something like that: example

At this point, this is what I want, the list of all my ember-engines.
But I don't know how to use it. By that I mean, how do I fetch the name of each engine, what is object at this point, I can't find anything about it.

I have tried the forEach() method, but it returns me : object.forEach is not a function. I have also tried the Object.keys method, but it returned me undefined, maybe somebody can indicate me a doc or something, I don't understand at all what is it.
Good day to you and thank you for reading.




Aucun commentaire:

Enregistrer un commentaire