Brief introduction
Angular.js is a mv* (model-view-whatever, either MVC or MVVM, integrated into the Mdv-model drive View) JavaScript framework, It is Google's launch of the SPA (single-page-application) application framework, which adds a lot of magical transformations to our web development.
Quick start to see the following code, in the browser will appear Hello world!
<!doctype html>
The following code binds the input box
<!doctype html>
Analysis of ANGULARJS Application
- Template (Templates) templates are files that you write in HTML and CSS to show the view of your app. You can add new elements and attribute tags to HTML as instructions for the Angularjs compiler. The ANGULARJS compiler is fully extensible, meaning that by angularjs you can build your own HTML markup in HTML!
- Application logic and behavior (logic and Behavior) application logic and behavior are controllers that you define with JavaScript. Angularjs Unlike standard AJAX applications, you do not need to write listeners or DOM controllers separately because they are already built into the ANGULARJS. These features make your application logic easy to write, test, maintain, and understand.
- The model data model is derived from the properties of Angularjs scope objects. The data in the model is probably a JavaScript object, an array, or a primitive type, which is not important, and it is important that they belong to the Angularjs scope object. ANGULARJS maintains a bidirectional synchronization of the data model and the view interface UI through scopes. Once the model state changes, ANGULARJS is immediately refreshed and reflected in the view interface, and vice versa.
Angularjs Very useful service features
- The underlying services include dependency injection, XHR, caching, URL routing, and browser abstraction services.
- You can also extend and add your own specific app services.
- These services make it easy for you to write Web apps.
Reference address
Angularjs-first-using.md