This is what I have in my controller.js
$scope.fileAdded = false;
$scope.fileNameChanged = function() {
$scope.fileAdded = true;
};
This button I want to enable ...
<a ng-disabled="!fileAdded" class="btn btn-primary" role="button">Click</a>
... when I choose a file:
<input type="file" name="file" id="file"
onchange="angular.element(this).scope().fileNameChanged(this)">
Although fileAdded
changes from false to true, the button is not enabled. Why is it still disabled?