Regarding differences in execution of Angular vs. JQuery
Angular.js is a framework .
This is because HTML code with special characters (directives and angular filters) is compiled and angular performs a link between Controller, Model and View (default MVC).
Therefore, you need to understand these drivers, services, policies, etc. I understand that it is a moderate learning curve.
It would be a good choice for an application that has CRUD for example.
Just include the ng-app property in the html element where you want to "enable" angularJS:
<title>Lista de compras</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.1.4/angular.min.js"></script></head><body>Hello<inputtype="text" ng-model="yourName"/>
In addition to the ng-app property (line 1), we use the ng-model property for DataBind to indicate that this element will be bound to an AngularJS variable, through variable yourName, in line 8. This means that any change in the text box will update the value of the variable.
Every time a template is updated - whether through an asynchronous AJAX call, or through direct manipulation
somewhere in the Controller code, Angular updates the data model and keeps it in sync with the View.
Among Objectives / Features:
- Abstraction DOM manipulation of application logic. This improves code testing.
- Abstracts the coupling between the client side and the server side of the application. This allows application development to evolve on both sides, in parallel, and allows reuse of code.
- Guide developers through building the entire application: from interface design, through business rule writing, to application testing.
When executing JQuery, your code will make calls to functions of a library, requested by some DOM event for example.
Now to load JQuery insert the reference to the library: