I inherited an ember application and can't figure out how to add a component to an engine.
I tried to create the component with:
web-app$ ember g component about-profile -ir fs-engine
installing component
create lib/fs-engine/addon/components/about-profile.js
create lib/fs-engine/addon/templates/components/about-profile.hbs
installing component-test
create tests/integration/components/about-profile-test.js
installing component-addon
create lib/fs-engine/app/components/about-profile.js
I then added the following to lib/fs-engine/addon/templates/components/about-profile.hbs
<article>
<h1>Test</h1>
<p>Please work</p>
</article>
I try to invoke this component at the template file lib/fs-engine/addon/templates/gw/itemdetail.hbs
<div></div>
It returns empty. Nothing is rendered. No error messages are displayed anywhere.
I am sure I am missing something very basic since I am new to Ember but I did read Ember Engines guide (http://ift.tt/2kn5aFk) and Ember Component guide (http://ift.tt/2n6MLAi).
thanks for your help!
Aucun commentaire:
Enregistrer un commentaire