lundi 10 août 2015

EmberJS Using Component in Different Context

I am trying to use a different library bootstrap-switch from within EmberJS.

I added the following with .on('didInsertElement'):

$(toggleTag).on('switchChange.bootstrapSwitch', function(event, state) {
      this.sendAction('updateAction', state);
});

However, when this event is invoked, the context of this will return object for the html element toggleTag. Instead, I need access to the component for this.

What is the recommended way of dealing with this issue?

Aucun commentaire:

Enregistrer un commentaire