Angular 2 Doing an else with ngClass

前端 未结 1 781
一整个雨季
一整个雨季 2021-02-05 01:24

I have the following template :

While this is working, I find it a bit ugl

1条回答
  •  梦如初夏
    2021-02-05 01:33

    Indeed

    or

    or


    Angular 9 Update

    But you should know that there's a difference in how different types of class bindings behave, especially when there are multiple types of class bindings on the same element.

    And the new compiler, Ivy, brings more clarity and predictability to it. Read More about it here

    0 讨论(0)
提交回复
热议问题