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

How to set the context of a component?

$
0
0

@Charles_Bourasseau wrote:

I found on this page a great example of https://github.com/emberjs/ember.js/issues/11043 how to inherits from a component. Here is the example: http://emberjs.jsbin.com/rwjblue/443/edit?html,css,js,output

I played a bit with and especially with actions and come to this question:

How can I set the context of the component?

Consider the following examples:

http://emberjs.jsbin.com/cofobanoca/edit?html,css,js,output

and a derivate of it

http://emberjs.jsbin.com/gipawemipe/1/edit?html,css,js,output

The are pretty much the same but in the second one, the component is dynamically added inside an action.

My question is, why is {{this}} in the second example a "generated application controller" and not a "App.XBarComponent"?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4828

Trending Articles