Ember.js - how to apply an action to everything {{#view}}

I would like to indicate my action (and "target" and 'on') in {{#view}} instead of as indicated below in the file

{{#view App.Views.List
        contentBinding="this"
        classNames="item"
        classNameBindings="content.type content.selected:selected"
}}
<div {{action "select"}}>text</div>
{{/view}}

So, the click applies to the entire area of ​​the App.Views.List instance. Is it possible?

+3
source share
1 answer

How to simply define a method clickdirectly on the view instead of using {{action}}?

App.Views.List = Ember.View.extend({
    click: function() {
        alert('clicked');
    }
});

See this script for an example.

+2
source

All Articles