'404 error from binding a background url even with ng-cloak

I am binding the background url css property in this way:

<div class="ng-cloak" style="background-image: url({{image.url}})"></div>

all the images are loaded correctly but in the console I have:

GET http://localhost:8100/%7B%7Bimage.url%7D%7D 404 (Not Found)

even if I use the class ng-cloak. Does someone know how to avoid this error and this bad request?



Solution 1:[1]

Try to use ng-style instead because angular will not check none ng-* https://docs.angularjs.org/api/ng/directive/ngStyle

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 mohammed barqawi