When I use Angular to dynamically change the backgroundImage div , I find that there are two ways to set backgrond-image:
first:
<div style="background:url({{example_expression}})"></div>
second:
<div ng-style="{backgroundImage: 'url({{example_expression}})'}"></div>
But when I change example_expression , only the first way can dynamically change the backgroundImage.
Plunker gives an example:
What happened to ngStyle?
source share