Skip to content

Directive not recognized even though Module is included #1265

@edthompson-nf

Description

@edthompson-nf

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions