Hello, I have a scenario where I need to upload two input files and after uploading them, they should be disabled individually. However, my current code disables both file inputs at the same time when trying to upload the first file. How can I modify the code to disable them separately?
angular
.module('app', [])
.controller('ctrl', function($scope) {
$scope.disabled = true;
});
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<style>
.ng-disabled {
background: #E9B96E;
}
</style>
<span ng-app="app" ng-controller="ctrl">
<input type="file" ng-class="{'ng-disabled': disabled}" ng-disabled="disabled" id="input1" />
<input type="file" ng-class="{'ng-disabled': disabled}" ng-disabled="disabled" id="input2"/>
</span>