Ember Engines Component does not render content

486 Views Asked by At

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>{{about-profile}}</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://ember-engines.com/guide) and Ember Component guide (https://guides.emberjs.com/v2.12.0/components/defining-a-component/).

thanks for your help!

1

There are 1 best solutions below

0
On

as it turns out, I was able to resolve this issue by stopping "ember server" and then restarting it after creating the component. simple as that!