Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4828

Passing down actions to child components

$
0
0

@Benjy1979 wrote:

Hi,

In the previous versions of ember.js you could pass actions down from a current component like

{{mycomponent  myaction=(action "clickCategory) }}

Then you could go into mycomponent you could use another component in it:

{{mychildcomponent myaction2=(action myaction)}} /* without quotes */

and then in mychildcomponent template you can use it straight away without the need to put it in the js of mychildcomponent.

In the new Glimmer/Octane stuff, how is this done? The Ember Guides seem not to cover it so I am duplicating the actions in child components and calling up to this.args.myaction2().

Basically put can I pass an action down a few layers of components without having to define a @action in the js of each descendant?

Posts: 5

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 4828

Trending Articles