0

我正在使用 Angular 6 开发一个网站,并希望在我的项目中使用ng2-file-upload 。我已经按照链接中的说明完成了所有操作。UI 中仍然出现错误。错误是

compiler.js:486 未捕获的错误:模块“AppModule”声明的意外值“MyRandomComponent”。

请添加@Pipe/@Directive/@Component 注解。在 syntaxError (compiler.js:486) at eval (compiler.js:15296) at Array.forEach () at CompileMetadataResolver.getNgModuleMetadata (compiler.js:15278) at JitCompiler._loadModules (compiler.js:34413) at JitCompiler._compileModuleAndComponents (compiler.js:34374) 在 JitCompiler.compileModuleAsync (compiler.js:34268) 在 CompilerImpl.compileModuleAsync (platform-b​​rowser-dynamic.js:239) 在 PlatformRef.bootstrapModule (core.js:5578) 在 eval (main.ts :11)

谁能建议我我哪里错了。如果使用任何其他文件上传包会更好。除了回答,jsfiddle 或类似的工作演示将非常适合参考。我想让文件上传 UI,就像在这个链接

4

0 回答 0