Complex angular js ng-class

后端 未结 5 1432
暗喜
暗喜 2020-12-23 16:40

I have the component and have a problem setting the css class to it. I want it to always have a class of \"box\", then to have additional classes specified by the directive

5条回答
  •  甜味超标
    2020-12-23 17:18

    You can use simple expression given below

    ng-class="{'active' : itemCount, 'activemenu' : showCart}"
    

提交回复
热议问题