Change classes conditionally Ionic2

后端 未结 3 783
栀梦
栀梦 2020-12-19 11:11

I want to change my classe for an element but I don\'t know how to process with Ionic 2. I tried this way but it\'s wrong :



        
3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-19 11:48

    You can use a simple ternary operator to set the class for your example.

    
    ...
    
    

提交回复
热议问题