How to conditionally render a css class with knockoutjs

前端 未结 1 1232
一整个雨季
一整个雨季 2021-02-07 01:18

I have some html like the following:

相关标签:
1条回答
  • 2021-02-07 01:51

    Something like

    <div data-bind="css: {'control-group': true, error: (!$data.DealCodeIsValid)}">
    

    Check here for more info

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