Seamus James
Seamus James

Reputation: 991

Angular UI elements: do I still need jQuery?

I'm just starting out in Angular, and I get the MVC model for organizing data architecturally, but I'm not sure about building custom UI elements without using jQuery (or vanilla js).

For example, I want to build a custom slider, sort of like a progress bar that a user can click (or touch) and drag to change the value. Is angular built for that, or would it require a hack-y solution? Would it be some combination of mouseover, mousedown, mousemove, mouseup events?

Upvotes: 2

Views: 774

Answers (1)

windweller
windweller

Reputation: 2385

AngularJS has its own lite version of jQuery. The document is here: http://docs.angularjs.org/api/angular.element

It is not supposed to handle heavy DOM manipulation and it will not support such thing in the future. If you want to build a custom slider, there is a plug-in called angular-ui: http://angular-ui.github.io/

However, Angular-ui uses jQuery as well. I also notice they don't have a built-in slider component, so my suggestion is that first you should use angular.element, if this cannot satisfy whatever you need, use jQuery.

Upvotes: 1

Related Questions