Combine [NgStyle] With Condition (if..else)

前端 未结 10 1521
暗喜
暗喜 2020-12-04 20:55

I have read NgStyle Documentation For Angular 2, and it is a little bit confusing for me. How do I use NgStyle with condition like (if...else) to set background image of any

10条回答
  •  醉话见心
    2020-12-04 21:52

    One can also use this kind of condition:

    It requires a bit less string concatenation...

提交回复
热议问题