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
327 stars 107 forks source link

Changed the JQuery detection #222

Closed priandsf closed 5 years ago

priandsf commented 5 years ago

In our application, we need to force Angular to use jqLite while jQuery is loaded. The current detection mechanism is checking if jQuery is loaded, but not if it is actually used. This pull request is checking if Angular.element is effectively jQuery by checking if angular.element.fn.jquery is defined, meaning that jQuery is the library used by Angular.

priandsf commented 5 years ago

@dhilt Hello Denis - Are you willing to merge these pull requests or do you have any concern with them?

dhilt commented 5 years ago

@priandsf Sorry, I haven't been here for 1 week...

priandsf commented 5 years ago

@dhilt Not a problem - I'll be out soon as well :-) The Jquery detection is pushed as PR#222 (https://github.com/angular-ui/ui-scroll/pull/222/commits/55f627cce1afb9e54613b65769b8ecdff4a8fa13), from this branch: https://github.com/priandsf/ui-scroll/tree/jquery-detection The $digest fixes are only in PR#221

dhilt commented 5 years ago

@priandsf I cherry-picked your commit and released angular-ui-scroll v1.7.4 with only jqLite/jQuery stuff. Could you please check if it does work for you? And let's continue optimization things in https://github.com/angular-ui/ui-scroll/pull/221.

priandsf commented 5 years ago

Thanks @dhilt I tested it and it works!