angularjs

$index only works in ng-repeat, its role is to get the index value of the current tag. In addition to $index, there are $first, $middle, $last, $even, $odd

 

ng-class = true, add class when false, empty or add other styles

ng-show = true show what you want

ng-bind = bind your model to html

$apply() lets the page know to check if the data has changed

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326397255&siteId=291194637