Tutorial: JavaScript reinforcement tutorial-AngularJS instructions this article is the official HTML5 training for H5EDU institutions
AngularJS expands HTML by calling the new attribute of the command. AngularJS uses built-in commands to add functions to applications. AngularJS allows you to customize commands. AngularJS commands are extended HTML attributes with the prefix ng -. The ng-app command initializes an AngularJS application. The ng-init command initializes application data. The ng-model command binds the element value (for example, the value of the input field) to the application. For the complete instruction content, see AngularJS reference manual. AngularJS instance
In the input box, try to enter:
Name:
You entered: {firstName }}
Tutorial, mainly introduced: JavaScript reinforcement tutorial-AngularJS command
Ng-app Command tells AngularJS,The element is the "owner" of AngularJS applications ". Note: A web page can contain multiple AngularJS applications running in different elements. The {firstName} expression in the Data Binding instance is an AngularJS data binding expression. Data Binding in AngularJS synchronizes AngularJS expressions with AngularJS data. {FirstName} is synchronized through ng-model = "firstName. In the next example, two text fields are synchronized using two ng-model commands: AngularJS instances.
Price calculator quantity:Price:
Total price:{Quantity * price }}
The above is the content of the AngularJS command in the JavaScript reinforcement tutorial. For more information, see PHP Chinese website (www.php1.cn )!