3 ms·
I'd argue you are pulling in a large library that has much more functionality and bloat than you actually need. For ajax, I'd prefer something like axios which
by cooljoe 11y ago
I'd argue you are pulling in a large library that has much more functionality and bloat than you actually need. For ajax, I'd prefer something like axios which uses es6 niceties like Promises and is much more targeted in its usage.
jQuery was originally a bridge for the gaps between browsers for lots of basic functionality. These days, all modern browsers give you a decent starting point with plain js, meaning there's not a whole lot of things that you really need jQuery for. Secondly, you mention that you are using angular, which already provides its own $http and $resource libraries for ajax... which I think shows even further that you don't actually need jQuery.
- jbkly7 11y agoHe's using jQuery on a separate landing page which is not part of his Angular app. I do wish jQuery would update to support ES2015 module exports so I could do something like import { ajax } from 'jquery';