I am developing a website in Angular 6 and want to use ng2-file-upload in my project. I have done everything according to the instructions in the link. Still am getting error in the UI. The error is
compiler.js:486 Uncaught Error: Unexpected value 'MyRandomComponent' declared by the module 'AppModule'.
Please add a @Pipe/@Directive/@Component annotation. at 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) at JitCompiler.compileModuleAsync (compiler.js:34268) at CompilerImpl.compileModuleAsync (platform-browser-dynamic.js:239) at PlatformRef.bootstrapModule (core.js:5578) at eval (main.ts:11)
Can anyone suggest me where am i wrong. If any other file-upload package would be better to use.
Along with answer a working demo in jsfiddle or similar would be great for reference.
I want to make the file uplaod UI, like in