ng2-file-upload icon indicating copy to clipboard operation
ng2-file-upload copied to clipboard

Directive not recognized even though Module is included

Open edthompson-nf opened this issue 1 year ago • 1 comments

I am having this issue after upgrading from version 1.4 to version 5

 error NG8002: Can't bind to 'uploader' since it isn't a known property of 'div'.
<div (onFileDrop)="fileDrop()" [uploader]="uploader" class="uploadArea" ng2FileDrop>

The Module has been included:

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

The Component:

@Component({
    selector: 'app-wizard',
    templateUrl: './wizard.component.html',
    styleUrls: ['./wizard.component.scss'],
})
export class WizardComponent implements OnInit, OnDestroy {
    @ViewChild('fileInput', { static: true }) fileInput: ElementRef;
    @ViewChild('saveNetworkAsCode', { static: true }) saveNetworkAsCode;

    // create an empty uploader until we have an actual URL
    uploader: FileUploader;
...

Not sure whats going on, and not sure if I "migrated" correctly

edthompson-nf avatar Nov 22 '23 14:11 edthompson-nf

I'm having exactly the same issue - also after upgrading from 1.4 to 5. Did you find a solution by now?

klui avatar Feb 06 '24 11:02 klui