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

How to pass event objects as parameters (from handlebars template to an action in a controller)

$
0
0

@Dev wrote:

Hello,

I am new to ember, thus I would appreciate your assistance. I want to pass an focus-out event (see bold marked text below) from my handlebars template:

{{input type="text" class="form-control" focus-out= (action "ccFocusLost" event) }}

To my action in my controller:

   ccFocusLost : function(event) {
    	alert(event.relatedTarget.tagName);
    },

However, i get an undefined when I do as above. I need a way to obtain the focus-out event in order to find out which element will receive the focus after my main element loses it.

Thanks in advance!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles