Dynamic class in Angular.js

后端 未结 4 2083
旧巷少年郎
旧巷少年郎 2020-12-02 17:00

I want to dynamically add a css class to an

  • element I am looping over. The loop is like this:

  • 4条回答
    •  我在风中等你
      2020-12-02 17:34

      If you just want to add a class, use the class attribute with interpolation:

      class="priority-is-{{todo.priority}}"
      

    提交回复
    热议问题