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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With