How can you bind to external events if you wrap let’s say a jquery ui plugin with an ember view?
I tried doing this:
App.SomeView = Ember.View.extend({
classNames: ['some', 'classes'],
templateName: 'some',
didInsertElement: function() {
this.$().on('external_event', this.someCallback);
}
});
And this:
App.SomeController = Ember.ObjectController.extend({
appendSomeView: function() {
var view = App.SomeView.create();
view.append();
view.on('external_event', this.someCallback);
}
});
But no luck, perhaps I’m doing something wrong?