Multiple classes in ngClass

后端 未结 3 1428
渐次进展
渐次进展 2021-02-07 20:52

I\'m trying to add multiple values in *ngClass, what used to work on previous alpha releases and doesn\'t seem to work now on angular2 beta:



        
3条回答
  •  南旧
    南旧 (楼主)
    2021-02-07 20:58

    You can also build a string containing several classes.

    In this case additionalClass is an @Input var containing the classname and active is a boolean that sets the active class

提交回复
热议问题