angular-rangeslider
angular-rangeslider copied to clipboard
Remove jQuery dependency
-various changes to remove dependency on jQuery methods
Just some notes to help you out (I don't feel like doing it myself).
- angular.element('html') will work, it only works on tag name selectors.
- You can avoid (probably) all of your .find and .querySelector calls by manually compiling the template. You create a single tag template like
template: '['<div class="ngrs-range-slider"></div>'then in your link function you useelement.appendand assign variables to each part you want to manipulate later, ie
handleMin = angular.element('<div class="ngrs-handle ngrs-handle-min"><i></i></div>');
runner = angular.element('<div class="ngrs-runner">');
runner.append(handleMin);
element.append(runner);
Then later on you can do handleMin.css(...); instead of the .querySelector('.ngrs-handle-min') which is faster as well I believe. Also has the advantage of having exactly the same requirements as angularjs as you aren't relying on any browser specific tags.
I can run this up as a PR as I've done it for other angular projects but I didn't want to step on @s9tpepper toes by overwriting his work!