angular-ui / ui-scroll

Unlimited bidirectional scrolling over a limited element buffer for AngularJS applications
http://angular-ui.github.io/ui-scroll/demo/
MIT License
326 stars 107 forks source link

bind/unbind is deprecreated #241

Closed darcyparker closed 4 years ago

darcyparker commented 4 years ago

This is not a serious error... but it bind and unbind are deprecated.

You won't have a problem if using jqlite, because in AngularJS, JQLite.prototype.bind = JQLite.prototype.on; and JQLite.prototype.unbind = JQLite.prototype.off;

But if you load JQuery 3.51 and the unminified jquery-migrate.js you will get logs about usage of deprecated functionality.

The above cases of bind() and unbind() should be on() and off() respectively.

dhilt commented 4 years ago

I made little research. The on/off methods appeared in jQuery 1.7 in 2011 and in AngularJS 1.2 in 2013. The angular-ui-scroll does not support AngularJS less than 1.2. So the change you proposed seems reasonable and will not affect any of the lib users. I switched base branch of your PR as I'm going to make some additional work. Thanks for your contribution!

dhilt commented 4 years ago

Closing, as angular-ui-scroll v1.8.1 had been released.