Do you understand that with Angular you read and write to the model... never to the page? (a.k.a. Forget about jQuery)
Rules to Better JavaScript and jQuery|c7f61c73-def9-41b0-9ab4-266c8d1b1ea6
v5.0
Posted at
6/03/2019 4:56 AM by
Tiago Araujo
Rule Intro
The most common mistake that developers make when moving from jQuery to Angular is that they continue to think about updating the page.
Page Content
-

- Figure: In jQuery, you design a page and then use jQuery to perform interactions with the page e.g. reading and setting the values of input boxes, updating the content of divs or handling button events
- Figure: Bad Example - using jQuery on Angular views will lead to worlds of pain
A fundamental principal of Angular is that you build a Model in JavaScript (or TypeScript) and then on your view you just databind your UI elements to the model. Any changes that are made are made to the model and the view updates automatically.
In Angular, you do not interact with the page you update the model, and the page is just displaying a view of the model.

- Figure: Good Example - In both AngularJs & Angular 2.0 jQuery is not required on the view. The view binds to properties on a JavaScript model
Further reading: http://stackoverflow.com/questions/14994391/thinking-in-angularjs-if-i-have-a-jquery-background
{3CD40E9E-38C3-4558-9A73-65BFB8DC5B6C}
Do you feel this rule needs an update?