ember-polyfills / ember-angle-bracket-invocation-polyfill

MIT License
76 stars 33 forks source link

Angle bracket use inside addon component fails #23

Closed jacojoubert closed 6 years ago

jacojoubert commented 6 years ago

Angle bracket components can't currently be used inside an addon component. To test this I created two components:

// my-button
<button>
  {{yield}}
</button>
// parent-component
<MyButton>
  {{yield}}
</MyButton>

It results in:

Assertion Failed: You cannot use 'MyButton' as a component name. Component names must contain a hyphen.

Angle bracket components do work in the addon's dummy app though.

Sample repo: https://github.com/jacojoubert/angle-bracket-test-addon

rwjblue commented 6 years ago

Any addons wanting to use angle bracket components (in either addon/ or addon-test-support/) need to include ember-angle-bracket-invocation-polyfill as a dependency. The linked demo includes it in devDependencies which will only allow the dummy app to use angle bracket components...

jacojoubert commented 6 years ago

Can't believe I missed that. Thanks and sorry for wasting your time.

rwjblue commented 6 years ago

No worries!

Techn1x commented 4 years ago

I've hit this problem as well, might be worth mentioning addon usage in the readme