Reputation: 4293
I'd like to specify my action (and 'target' and 'on') in the {{#view}} instead of as below on a contained within
{{#view App.Views.List
contentBinding="this"
classNames="item"
classNameBindings="content.type content.selected:selected"
}}
<div {{action "select"}}>text</div>
{{/view}}
So that the click applied to the whole area of the App.Views.List instance. Is this possible?
Upvotes: 3
Views: 1078
Reputation: 546
How about just defining the method click
straight on the View instead of using an {{action}}
?
App.Views.List = Ember.View.extend({
click: function() {
alert('clicked');
}
});
See this fiddle for an example.
Upvotes: 2