I'm trying to dynamically load an EmberJS component, but the lookup returns undefined. I'm still rather new to Ember, so I think I'm missing some concept. Here is my code:
var component = getOwner(this).lookup('component:mycomponent, {singleton: false});
This a new component that I've just created.It has its component class (.js), template(.hbs) and route. If I replace 'mycomponent' with the name of an already existing component, say otherComponent, the lookup succeeds. The new class, template and route are in the same folders as the other files of their type. I'm at a loss as to why this fails as I've used lookup before with other components. Can someone enlighten me? Do I need to somehow register the new component so that it found via lookup?
Thanks
Aucun commentaire:
Enregistrer un commentaire