Just learn angular, do some notes to make it easy for you to look over.
Ng-app: Fill in the name of the module
Ng-init: Initializing data (typically initialized via controller)
Ng-model: Fill out the data model
Ng-bind: Binding data Model for presenting data
Ng-controller: Controller for storing data, changing data, etc.
Ng-disabled: Binding Application Data to HTML disabled properties
Ng-show (ng-hide): Controls the display or hiding of DOM elements by true or false data
ng-event name: Corresponding event for binding HTML (ex: Ng-click binding onclick Event) Note: onchange time cannot be bound
Ng-include: Used to contain HTML content that needs to be in a server environment
Ng-repeat: Used to traverse the data and fill in the HTML
{{$scope. Name}}: Two curly braces are angular expressions that can contain literals, operators, and variables
$http. Get (URL) functions for reading server data
Cases:
function Customerscontroller ($scope, $http) {
$http. Get (".. /xxx.php ")
. Success (Function (response) {$scope. data = response;});
}
Create a module
var app = Angular.module ("myApp", []); MyApp is the module name
New Controller
App.controller ("Mycontroller", function ($scope) {
$scope. Data = "something";
$scope. method = function () {
/* Some actions */
}
})
Filter filters
With the pipe symbol "|" Can be followed, for example
<p><input type= "text" ng-model= "name" ></p>
<ul>
<li ng-repeat= "x in Names | filter:name |: ' Country ' >
{{(X.name | uppercase) + ', ' + X.country}}
</li>
</ul>
Currency: Formatting numbers for currency formats
Filter: Select a subset from the array item
Lowercase: formatted string is lowercase
ORDER BY: Arrange an array from an expression
Uppercase: formatted string is uppercase
AngularJs Beginner's Introductory learning notes