1.ng-init
Used to initialize the data, as in $scope, but is useful when mated with repeat instructions:
<Divng-repeat= "Arrouter in arr"Ng-init= "Outerindex = $index"> <Divng-repeat= "Arrinner in Arrouter"Ng-init= "Innerindex = $index"> <P>{{Arrinner}}:{{outerindex}}{{innerindex}}</P> </Div></Div>
2.ng-controller
When the callback inside the controller is the writing of an object. Such as:
1.controller (' Aaa ', [' $scope ', fnaaa]);
function Fnaaa ($scope) {
}
FnAaa.prototype.num = ' 123 ';
The use of the Ng-controller directive is to be written like this.
<div ng-controller= "fnaaa as A1" >
<div>{{a1.text}}:{{a1.show ()}}</div>
</div>
The A1 here is a Fnaaa object that is created.
3.ng-model
This command is used for bidirectional data binding, which is used in the input box.
Events that trigger data changes can be configured through Ng-model-options.
<input type= "text" ng-model= "text" ng-model-options= "{updateon: ' Blur '}" >
Ng-init,ng-controller,ng-model