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

How to get a component's instance from within an eventManager object

$
0
0

@ctusch wrote:

When I have a component with an eventManager how can I get the instance of the component from within a handler?

The handler's second parameter contains only the component clicked on, which can be a nested component. When I define the handler directly on the component 'this' points to the component. In the eventManager it points to the eventManger.

I'd like to use the eventManager because it puts all handlers neatly in one place and passes the component from which the event originated. Is there a good solution to this problem?

Posts: 7

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4829

Trending Articles