我阅读了以前的问题,并且答案的解决方案已经到位,这就是为什么我开始另一个问题
我在Angular 5中收到ng2-file-upload的以下错误:
Uncaught Error: Template parse errors:
Can't bind to 'uploader' since it isn't a known property of 'div'. ("s': hasAnotherDropZoneOver}"
(fileOver)="fileOverAnother($event)"
[ERROR ->][uploader]="uploader"
class="well my-drop-zone">
Another drop zone
"): ng:///AppModule/UploadComponent.html@25:17
at syntaxError (compiler.js:466)
at TemplateParser.parse (compiler.js:24312)
at JitCompiler._parseTemplate (compiler.js:33699)
at JitCompiler._compileTemplate (compiler.js:33674)
at eval (compiler.js:33576)
at Set.forEach (<anonymous>)
at JitCompiler._compileComponents (compiler.js:33576)
at eval (compiler.js:33446)
at Object.then (compiler.js:455)
at JitCompiler._compileModuleAndComponents (compiler.js:33445)
我将指令导入并声明到我的指令中app.module.ts
,错误仍然存在。有人遇到过ng-file-upload和angular 5这个问题吗?
FileUploadModule
需要在声明组件的模块中导入并添加到导入中。
import { FileUploadModule } from "ng2-file-upload"; //Should import HERE
imports: [ ...FileUploadModule ... ] //RIGHT PLACE
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句