title: Angularjs file upload doesn't work ($files is undefined)
body: <p>I use danialfarid library fileUpload. </p>
  
  <p><a href="https://github.com/danialfarid/angular-file-upload" rel="nofollow">https://github.com/danialfarid/angular-file-upload</a>
  And i do same things like in "Usage article on GitHub page", but i have an error after i chose file: "Uncaught TypeError: Cannot read property 'length' of undefined" and this undefined is $files.</p>
  
  <p>Here is my Controller:</p>
  
  <pre class="lang-js prettyprint-override"><code>$scope.onFileSelect = function($files) {
    console.log($files); // undefined
  //$files: an array of files selected, each file has name, size, and type.
  for (var i = 0; i &lt; $files.length; i++) {
    var file = $files[i];
    $scope.upload = $upload.upload({
      url: '/cards/avatar/save_from_disk', //upload.php script, node.js route, or servlet url
      data: {myObj: $scope.myModelObj},
      file: file,
    }).progress(function(evt) {
      console.log('percent: ' + parseInt(100.0 * evt.loaded / evt.total));
    }).success(function(data, status, headers, config) {
      // file is uploaded successfully
      console.log(data);
    });
  }
  </code></pre>
  
  <p>};</p>
  
  <p>And in my view:
  </p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;input type="file" title="" accept="image/*"  ng-file-select="onFileSelect($files)" class="upload" /&gt;
  </code></pre>