I have a controller that has to react to viewport changes.
The naive approach would be to just bind a jQuery resize listener, but that could mess with the Ember run loop.
The best practice approach is to use Ember.run.bind
This works just fine, but I wonder how to unbind such an event once the controller is no longer active?
Aucun commentaire:
Enregistrer un commentaire