Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should learn angularjs without jQuery? [closed]

I am newbie with client-side JavaScript. In one web project, I found about angularjs and use some basic on this. Should I learn jQuery or just use Angularjs for other project?

like image 671
cuong nguyen Avatar asked Aug 24 '13 08:08

cuong nguyen


People also ask

Is jQuery necessary AngularJS?

jQLite is enough for angular to work. This is to minimize dependencies. Yet, if you load jQuery before angular, then angular will use jQuery. Most of the time, you do not need to use jQuery.

Can I learn AngularJS without knowing JavaScript?

I don't recommend learning Angular without at least a basic understanding of JavaScript. The task will be, to put it mildly, 100x tougher if you don't know JavaScript. Other web development frameworks are a little more forgiving towards people who don't have a solid understanding of JavaScript.

Is it worth learning jQuery in 2022?

It's good to know jQuery and there are still use cases for it. However, you should not spend a lot of time learning it. jQuery should not be your focus this year. The biggest advantage of jQuery now is that you can manipulate the DOM with less code.

Is AngularJS better than jQuery?

jQuery is easier to understand than Angular that is said to have a learning curve. Everything from DOM manipulation, Ajax calls, to delegating events and adding elements, jQuery makes it quite easy to get a handle on.


2 Answers

While learning AngularJS it is best not to include jQuery. Please note that I'm talking about the learning process here, not saying that you shouldn't use jQuery in your final project.

The philosophies and approaches of both libraries to UI construction (declarative AngularJS and imperative jQuery) are so different that you need to somehow unlearn many of the jQuery habits to get most of the AngularJS.

Leaving out jQuery during the learning process will "force" you to embrace the AngularJS way. When you've got full grasp of AngularJS you can start introducing jQuery in directives only.

For the broader discussion of the topic see "Thinking in AngularJS" if I have a jQuery background? but in short:

Start learning AngularJS without including jQuery.

like image 161
pkozlowski.opensource Avatar answered Oct 05 '22 22:10

pkozlowski.opensource


You can get along fine with angular.js without using jQuery if you stick to it's core features. If you want to include third party libraries in your project most of them use jQuery nowadays so you will get in touch with it one way or another.

Note that this situation "improves" as the angular folks are constantly porting those libraries to angular. E.g. bootstrap is ported in the angular-ui bootstrap project to native angular.js (http://angular-ui.github.io/bootstrap/).

One remaining issue is, that jQuery takes a lot of effort in supporting older browser version which angular.js does not. So while original bootstrap supports ie8 angular-ui's team decided not to.

My advice would be: start with plain angular.js and if the need for third party components arises decide if it's worth for you to include additional complexity with jQuery.

EDIT: Here is described how angular interacts with jQuery: AngularJS DOM selector

like image 20
Scheintod Avatar answered Oct 06 '22 00:10

Scheintod