Hi I have the following code to set the background to the whole page, and it works fine the background image is showed as expected, but the chrome console show this errors
GET http://localhost:3000/assets/img/backgrounds/%7B%7Bbgimg%7D%7D 404 (Not Found)
GET http://localhost:3000/assets/img/backgrounds/ 404 (Not Found)
This error is similar when loading image with src instead of ng-src but for background I don't know any directive. here is my code
HTML:
<body background="assets/img/backgrounds/{{bgimg}}">
<div class="view-container layer">
<div ng-view></div>
</div>
The controller
var bgImagesList = ['01.jpg',
'02.jpg', '03.jpg', '04.jpg',
'05.jpg', '06.jpg', '07.jpg',
'08.jpg', '09.jpg', '10.jpg',
'11.jpg'];
var changeBaclground = function () {
$rootScope.bgimg = bgImagesList[Math.floor(Math.random() * bgImagesList.length)];
};
ng-classorng-styleI believe.