JSFiddle - React, Tailwind, and code Playground
by Manoj kumar Lakshman
HTML
<div ng-app="testApp" ng-controller="testCtrllr">
<div ng-style="{'background-color': backgroundImageInfo}">
<input type="file" onchange="angular.element(this).scope().fileThatChangeBackground(this)" />
</div>
</div>
JavaScript
angular.module('testApp',[])
.controller('testCtrllr', function($scope){
$scope.backgroundImageInfo='red';
$scope.fileThatChangeBackground = function(scope) {
$scope.$apply(function(){$scope.backgroundImageInfo='blue';});
};
});