Hi. Is there any way to make a component that extends another component? Here’s the code:
// my-base-component.js
export default Ember.Component.extend({
classNames: "my-base-component"
});
// my-base-component.hbs
{{yield}}
// my-other-component.js
export default Ember.Component.extend({
classNames: "my-other-component"
});
// my-other-component.hbs
{{#my-base-component}}
whatever
{{/my-base-component}}
What I want to achieve, when rendering my-other-component
:
<div class="my-base-component my-other-component">
whatever
</div>
What I get:
<div class="my-other-component">
<div class="my-base-component">
whatever
</div>
</div>
Now, I get that this is how ember works
But is there any way to make ember work my way?