This article is the official HTML5 training course for h5edu institutions, mainly introduces: JavaScript intensive tutorial--angularjs
AngularJS Introduction
AngularJS is a JavaScript framework. It can be added to the HTML page by <script> tags.
AngularJS extends HTML through instructions, and binds data to HTML through an expression.
AngularJS is a JavaScript framework
AngularJS is a JavaScript framework. It is a library written in JavaScript.
AngularJS is published as a JavaScript file and can be added to a Web page by a script tag: <script src= "Http://apps.bdimg.com/libs/ang ... gt%3b[note] We recommend placing the script at the bottom of the <body> element.
This will increase the page load speed, because HTML loading is not subject to script loading.
Each angular.js version download: https://github.com/angular/angular.js/releases
AngularJS extends the HTML
AngularJS extends HTML through ng-directives.
The NG-APP directive defines an AngularJS application.
The Ng-model directive binds the element value (such as the value of the input field) to the application.
The ng-bind directive binds the application data to an HTML view.
AngularJS instance <! DOCTYPE html>
<meta charset= "Utf-8" >
<script src= "Http://apps.bdimg.com/libs/ang ... gt%3b
<body>
<div ng-app= "" >
<p> Name: <input type= "text" ng-model= "name" ></p>
</div>
</body>
Example Explanation:
When the page is loaded, AngularJS automatically opens.
The Ng-app directive tells the angularjs,<div> element to be the "owner" of the AngularJS application.
The Ng-model directive binds the value of the input field to the application variable name.
The ng-bind directive binds the application variable name to the InnerHTML of a paragraph.
[Note] If you remove the ng-app instruction, HTML will display the expression directly, and will not evaluate the result of an expression.
What is AngularJS?
AngularJS makes it easier to develop a modern single-page application (Spas:single page applications).
AngularJS binds application data to HTML elements.
AngularJS can clone and repeat HTML elements.
AngularJS can hide and display HTML elements.
AngularJS can add code to the HTML element "behind".
AngularJS supports input validation.
Click to enter JavaScript Intensive tutorial: http://www.h5edu.cn/htm/step/h5edu_44.html
JavaScript Intensive Tutorial--angularjs