How to conditionally apply CSS styles in AngularJS?
2014-09-22 12:50
525 查看
http://stackoverflow.com/questions/13813254/how-do-i-conditionally-apply-css-styles-in-angularjs
when using ng-repeat and some class needs to be different,we can use:
<div ng-repeat="item in items" ng-class="{'Name': Your Condition}">
... HTML to display the item ...
<input type="checkbox" ng-model="item.checked">
</div>
For example:
when using ng-repeat and some class needs to be different,we can use:
<div ng-repeat="item in items" ng-class="{'Name': Your Condition}">
... HTML to display the item ...
<input type="checkbox" ng-model="item.checked">
</div>
For example:
<div ng-repeat="item in items" ng-class="{'pending-delete': item.checked}"> ... HTML to display the item ... <input type="checkbox" ng-model="item.checked"> </div>
相关文章推荐
- [转]How to Create Custom Filters in AngularJs
- How to Create Custom Filters in AngularJs
- How to use a keypress event in angularjs
- How to call a service function in AngularJS ng-click
- how to avoid css and js cache in UIWebView
- How to redirect to login page after cookie expires in Angular JS?
- How to use $http and $resource in Angular JS
- How to define multiple controllers for one view in angularJS?
- Spring MVC – How To Include JS Or CSS Files In A JSP Page
- js原型继承与多态 How to apply virtual function in javascript
- Spring MVC – How to include JS or CSS files in a JSP page
- How to use ngMessages in AngularJS
- How to apply the visa to UK in Japan
- How To Apply Patches in E-Business Suite
- how to add Javascript and CSS in page layout with sharepoint 2013
- use noscript html tag when user disable the javascript in browser, guide user how to enable the js in different browser and retu
- How to create an OCM Response file to apply patch in silent mode - opatch silent (Doc ID 966023.1)
- How to Use Buffers in Node.js
- How to install masterpage,pagelayout,CSS,JS and images through Feature
- How to use the new CSS syntax in Flex 4