我從一個自定義的指令,我已經寫了這個錯誤:
Error: [$compile:nonassign] http://errors.angularjs.org/1.2.16/$compile/nonassign?p0=&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
上的文件upload.js的81行的指令代碼(oFReader.onload文件上傳.js文件:81)是:
scope.fileUploadImage = attachment;
scope.fileUploadLoading = false;
scope.$apply(); //line 81
scope.fileUploadCallback();
這裏是哪裏調用指令在我的視圖文件:
<div file-upload
file-upload-image="fileAttachment"
file-upload-loading=""
file-upload-error="errors"
file-upload-limit="1048576"
file-upload-callback="attachFile()"
class="field">
代碼工作爲例外,但我不能看米擺脫這個錯誤。任何幫助?