I seem unable to apply style in css on element after using ng-style to setup background image.
HTML:
<body id="bg" ng-controller="BgImagesListController" ng-style="selBGImg">
CSS:
#bg {
background: center center fixed transparent;
-webkit-background-size: contain;
-moz-background-size: contain;
-o-background-size: contain;
background-size:contain;
}
JS:
var mlwcApp = angular.module('mlwcApp', [])
.controller('BgImagesListController', function($scope, $http) {
$scope.selBGImg = {
background : 'url(bgimgs/bg.jpg)'
};
});
I used to setup background image in css and it worked. After using ng-style, the image can be shown but all other style gone. Any idea?