I use this method to upload a file:
<input type="file" name="upload-file" ng-model= "excelFile" accept=".xlsx" onchange="angular.element(this).scope().fileChanged(this);" required="true" />
Create a fileChanged method in the controller
$scope.fileChanged = function(files) { $scope.excelFile = files[0]; };
It works in FireFox, Chrome IE10, IE11, but in IE9 it shows that "files have a value of zero undefined".
javascript angularjs internet-explorer
Shankar kamble
source share