Angular 2: Can't bind to 'uploader' since it isn't a known property of 'input'

前端 未结 2 672
感动是毒
感动是毒 2020-12-30 04:48

Im trying to integrate ng2-file-upload module into my application.

And im getting this template error: Can\'t bind to \'uploader\' since it isn\'t a known property o

2条回答
  •  不知归路
    2020-12-30 05:30

    add to app.module.ts this

    import { FileSelectDirective } from 'ng2-file-upload';
    @NgModule({
        imports: [
            ...
    ],
        declarations: [
            FileSelectDirective
        ],
        providers: [
            ...
    ],
        bootstrap: [
            App,
        ],
    })
    

    https://github.com/valor-software/ng2-file-upload/issues/418#issuecomment-249865170

    Or try to import FIleUploadModule to an each parent module

    import { FIleUploadModule } from 'ng2-file-upload';

    imports: [
        FIleUploadModule,
        ..........,
        ........,
        ......,
    
    ]
    

    It should work.

提交回复
热议问题