Directives
ng-model
Associate the values from the view with the $scope
ng-click
Associate the event click$scope.clickFunction = function ( param1 ){
.//...
}
In the view
ng-click = "clickFunction( param1 ) "
ng-repeat
$scope.array = response.data;
In the view
ng-repeat = " elem in array "
FILTERS
orderBy, use the sign of "+" "-" for asc or desc order
ng-include
Include a file.
E.x . ng-include = " 'table.html' "
This is passing table.html as a string parameter
ng-cloak
Hide portions until AngularJs has a chance run and go through parse the HTML and replace the directives or the bindings with the actual values
- Add to the body tag
- <body ng-cloack>
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
display: none !important;
}
Comentarios
Publicar un comentario