AngularJS ng-class multiple conditions with OR operator

后端 未结 5 659
予麋鹿
予麋鹿 2021-02-07 01:51

I try to find out the good syntax for adding classes depending on angular values. I want to activate a class regarding 2 conditions (one on live user changes, and one on loading

5条回答
  •  时光说笑
    2021-02-07 02:31

    For example: In my scenario i need to apply uppercase class in some condition and in some condition i do not need to apply that uppercase class.

    inputTextCapitalSmall(assetId) {
        return {
          'uppercase': assetId !== 'TELEKURS' && assetId !== 'REUTERS' && assetId !== 'S&P',
        };
      }
    
    

提交回复
热议问题