title: AngularJS Error: [$compile:nonassign]
body: <p>I get this error from a custom directive i have wrote:</p>
  
  <pre><code>Error: [$compile:nonassign] http://errors.angularjs.org/1.2.16/$compile/nonassign?p0=&amp;p1=fileUpload
      at Error (native)
  (anonymous function) angular.js:9778
  (anonymous function) angular.js:7216
  h.$digest angular.js:12270
  h.$apply angular.js:12516
  oFReader.onload file-upload.js:81
  </code></pre>
  
  <p>The directive code on line 81 of file-upload.js (oFReader.onload file-upload.js:81) is:</p>
  
  <pre><code>scope.fileUploadImage = attachment;
  scope.fileUploadLoading = false;
  
  scope.$apply(); //line 81
  
  scope.fileUploadCallback();
  </code></pre>
  
  <p>Here is the where I call the directive in my view file:</p>
  
  <pre><code>&lt;div file-upload
   file-upload-image="fileAttachment"
   file-upload-loading=""
   file-upload-error="errors"
   file-upload-limit="1048576"
   file-upload-callback="attachFile()"
   class="field"&gt;
  </code></pre>
  
  <p>The code works as excepted but i can't seem to get rid of this error. Any help?</p>