title: AngularJS promise not resolving file with FileReader
body: <p>I am trying to write a very simple function in my service that will create a FileReader, read the small image file I send it and return this result in a promise to my controller. The file gets to my service just fine. It gets to my controller and logs just a blank line. I assume I am messing up the promise part of this somehow. Where am I going wrong there?</p>
  
  <p>Service funtion --</p>
  
  <pre><code>this.fileRead  = function(file) {
      var deferred = $q.defer();
  
      var reader = new FileReader();
      reader.readAsDataURL(file);
  
      deferred.resolve(reader.result);
  
      return deferred.promise;
  };
  </code></pre>
  
  <p>Controller function --</p>
  
  <pre><code>$scope.onFileSelect = function($files) {
       MyService.fileRead($files[0])
                    .then(function(result) {
                      console.log(result);
                   });
  };
  </code></pre>