在jQuery中， 選擇器用於查找DOM元素，然後綁定/註冊事件處理程序。 當事件觸發時，該（必要的）代碼將執行以更新/更改DOM。
在AngularJS中，您想要考慮視圖而不是DOM元素。 視圖是包含AngularJS 指令的 （聲明式）HTML。 指令為我們在幕後設置事件處理程序，並為我們提供動態數據綁定。 選擇器很少使用，因此對ID（以及某些類的類型）的需求大大減少。 視圖與模型綁定（通過範圍）。 視圖是模型的投影。 事件更改模型（即數據，範圍屬性），以及投影這些模型的視圖“自動”更新。
- 想想你想如何展示你的模型 - 你的觀點。 為每個視圖創建HTML模板，使用必要的指令獲取動態數據綁定。
- 將控制器連接到每個視圖（使用ng-view和routing或ng-controller）。 讓控制器僅查找/獲取視圖需要完成其工作的任何模型數據。 盡可能使控制器變薄。
jQuery is a DOM manipulation library.
AngularJS is an MV* framework.
Being a framework, it hosts your code and takes ownership of decisions about what to call and when!
AngularJS itself includes a jQuery-lite edition within it. So for some basic DOM selection/manipulation, you really don't have to include the jQuery library (it saves many bytes to run on the network.)
AngularJS has the concept of "Directives" for DOM manipulation and designing reusable UI components, so you should use it whenever you feel the need of doing DOM manipulation related stuff (directives are only place where you should write jQuery code while using AngularJS).
AngularJS involves some learning curve (more than jQuery :-).
They're apples and oranges. You don't want to compare them. They're two different things. AngularJs has already jQuery lite built in which allows you to perform basic DOM manipulation without even including the full blown jQuery version.
jQuery is all about DOM manipulation. It solves all the cross browser pain otherwise you will have to deal with but it's not a framework that allows you to divide your app into components like AngularJS.
A nice thing about AngularJs is that it allows you to separate/isolate the DOM manipulation in the directives. There are built-in directives ready for you to use such as ng-click. You can create your own custom directives that will contain all your view logic or DOM manipulation so you don't end up mingle DOM manipulation code in the controllers or services that should take care of the business logic.
Angular breaks down your app into - Controllers - Services - Views - etc.
and there is one more thing, that's the directive. It's an attribute you can attach to any DOM element and you can go nuts with jQuery within it without worrying about your jQuery ever conflicts with AngularJs components or messes up with its architecture.
I heard from a meetup I attended, one of the founders of Angular said they worked really hard to separate out the DOM manipulation so do not try to include them back in.
getElementByHerpDerp shorter and cross-browser.
AngularJS allows you to make your own HTML tags/attributes that do things which work well with dynamic web applications (since HTML was designed for static pages).
AngularJS extends HTML, so you don't have to put
- jQuery / Underscore for the facade pattern (like WYSIWYG's for manipulating the DOM)
- Prototype.js for the prototype/ constructor/ mixin pattern
- RequireJS / Curl.js for the module pattern/ AMD
- KnockoutJS for the observable, publish/subscribe pattern
NB: This list is not complete, nor 'the best libraries'; they just happen to be the libraries I used. These libraries also include more patterns, the ones mentioned are just their main focuses or original intents. If you feel something is missing from this list, please do mention it in the comments, and I will be glad to add it.
Can you describe the paradigm shift that is necessary?
Imperative vs Declarative
How do I architect and design client-side web apps differently?
What is the biggest difference? What should I stop doing/using; what should I start doing/using instead?
jQuery is a library
AngularJS is a beautiful client-side framework, highly testable, that combines tons of cool stuff such as MVC, dependency injection , data binding and much more.
The best way to start is going through their awesome tutorial . You can go through the steps in a couple of hours; however, in case you want to master the concepts behind the scenes, they include a myriad of reference for further reading.
Are there any server-side considerations/restrictions?
You may use it on existing applications where you are already using pure jQuery. However, if you want to fully take advantage of the AngularJS features you may consider coding the server side using a RESTful approach.