title: How to access HTML input FileUpload FileList object using AngularJS?
body: <p>I want to access the value of the FileList object when I Choose files using HTML input FileUpload. When I <code>console.log</code> this FileList object, I can see this object in the console window but I am not able to access the values using AngularJS.</p>
  
  <p>This is my code:-</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"&gt;&lt;/script&gt;
  
  &lt;body&gt;
  
  &lt;div ng-app="myApp" ng-controller="MyCtrl"&gt;
  
  &lt;input type="file" id="myFile" multiple size="50" ng-model="file" onchange="angular.element(this).scope().myFunction()"&gt;
  
  &lt;p id="demo" ng-repeat="file in fileList"&gt;
    Name: {{file.name}} &lt;/br&gt;
    Type: {{file.type}} &lt;/br&gt;
  &lt;/p&gt;
  {{fileList}}
  
  &lt;/div&gt;
  &lt;script&gt;
  var app = angular.module('myApp', []);
  
  app.controller('MyCtrl', ['$scope', function($scope){
   $scope.myFunction = function(){
      var x = document.getElementById("myFile");
      $scope.fileList = x.files;
      console.log($scope.fileList); 
   };
  }]);
  
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>