现在的位置: 首页 > 综合 > 正文

ngclass in angular

2018年05月22日 ⁄ 综合 ⁄ 共 200字 ⁄ 字号 评论关闭

http://stackoverflow.com/questions/7792652/what-is-the-best-way-to-conditionally-apply-a-class-with-angularjs

ng-class="{selected: $index==selectedIndex}"
ng-class="($index==selectedIndex) ? 'selected' : ''"

抱歉!评论已关闭.