3 ms·
Angular renders the most used parts of JQuery useless, if you use Angular the "right" way. If we do consider it, two of the most used parts of JQuery are $.ajax
by ganarajpr 13y ago
Angular renders the most used parts of JQuery useless, if you use Angular the "right" way. If we do consider it, two of the most used parts of JQuery are $.ajax and querying the DOM.
Because angular already provides you $http and $resource which are more than capable of doing everything that $.ajax does - $.ajax and all its variant that JQuery brings in become redundant.
Because of the way Angular is and because of its philosophy of directives - You generally dont need to query the DOM at all most of the time ( like 90% of the time ). For the rest of the 10% of the time when you do need to query the DOM, you only need to go one step below a directives element (direct children). If you are doing anything more complex, then you are doing something wrong again. For this basic case, Angular already provides you JQLite which is capable of doing the querying for simple scenarios like this.
About the helper functions that JQuery provides - angular too provides quite a few helpers - and they are sufficient for like 95% of the cases. For other stuff you might want to consider underscore.
So, why do you need to include JQuery?
- jacques_chester 13y ago> So, why do you need to include JQuery? Because it's the foundation of jQuery UI, and JQUI has modules that I don't feel like writing myself from scratch (sortable nested lists). Still, the joins between Angular and JQUI (through AngularUI) are fairly visible. It's not a smooth ride at the moment.