vendredi 16 octobre 2020

How to use ember-maybe-in-element addon?

I have a scenario where I want to append child component say child-component to a different component dynamically. example - I want to achieve

<div class="container">
  <div class="content">
    <child-component></child-component>
   </div>
</div>

I am using document.querySelector('.container .content').appendChild('this.element.querySelector('[data-child-content]')) in child-component.js file.

I want to use https://github.com/DockYard/ember-maybe-in-element addon to achieve this appendChild. Any suggestions on how to achieve this in the above scenario?




Aucun commentaire:

Enregistrer un commentaire