AngularJS is designed to overcome the shortcomings of HTML in building applications. HTML is a well-designed declarative language for static text display, but it seems weak to build WEB applications. So I did some work (you can also think it is a little trick) to let the browser do what I want. I haven't written anything for a long time. I don't know where to start writing anything. now I should write something technical first, angularjs-my brother called it "brother-in-law js"
1. Download
The code is as follows:
Official website: https://angularjs.org/
CDN:https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.5/angular.min.js
2. Introduction 1. ng-app
The scope of angularjs is determined. you can use
The code is as follows:
...
For angularjs to render the entire page, you can also use
The code is as follows:
……
To render some of them.
2. ng-model
Ng-model: when your data model is changed, for example, ng-model = 'test', where the value of test is changed, the value of {test} will also change, that is, the value of test connected to ng-model will also change, as shown below:
The code is as follows: