This is great! Though, I ran into the issue when more than one view is using this mixin. I'd recommend to change it to the following:
bindScrolling() {
Ember.$(document).bind('touchmove', this.scrolled);
Ember.$(window).bind('scroll', this.scrolled);
},
unbindScrolling(){
Ember.$(window).unbind('scroll', this.scrolled);
Ember.$(document).unbind('touchmove', this.scrolled);
}
</code>
</pre>
This way you are just binding the specific view's methods, and you're not unbinding all functions when you do unbind scrolling.
This is great! Though, I ran into the issue when more than one view is using this mixin. I'd recommend to change it to the following: