mercredi 26 août 2015

Ember communicate between child components

I'm trying to make a header component, which has several inside components, such as a button, and one of them opens a side menu that is a child component also.

How can target an action of one child component to another child component?

In this case, target the open action in the button component to the overlay component?

{{#header-block class="main-nav"}}

  {{button-icon icon="fi-torso" class="nav-action left" openMenu=(action "open" target=) }}

  {{#overlay-block}}
    {{#side-menu}}
      <p>side menu one</p>
    {{/side-menu}}
  {{/overlay-block}}

{{/header-block}}




Aucun commentaire:

Enregistrer un commentaire