How to change a CSS property dynamically in AngularJS

后端 未结 4 1760
北海茫月
北海茫月 2021-01-12 05:23

Right now I have a background image URL hard-coded into CSS. I\'d like to dynamically choose a background image using logic in AngularJS. Here is what I currently have:

4条回答
  •  梦谈多话
    2021-01-12 06:02

    You can use ng-class : documation. If you want to do it in your directive check directive - attr : attr.

提交回复
热议问题