0
は、私はパスからFileDropDirectiveをインポートエラーが発生しているこの角度ドラッグ&ドロップコンポーネント
import { Component, OnInit } from '@angular/core';
import { FileDropDirective } from 'angular2-file-drop';
@Component({
selector: 'app-drag-and-drop',
template: `
<div fileDrop
[ngClass]="{'file-is-over': fileIsOver}"
[options]="options"
(fileOver)="fileOver($event)"
(onFileDrop)="onFileDrop($event)">
Drop file here
</div>
`,
directives: [ FileDropDirective ],
styleUrls: ['./drag-and-drop.component.scss']
})
export class DragAndDropComponent implements OnInit {
}
のようなものは何もエクスポートされたメンバーのFileDropDirective」を持っていないと持って、角4 https://github.com/jellyjs/angular2-file-drop
でこのコンポーネントを使用してみてください[FileDropDirective]、 オブジェクトリテラルは既知のプロパティのみを指定し、 '指示文'は 'コンポーネント'タイプには存在しません。
を変更しますファイルドロップ ' –
しかし、ディレクティブの行にもエラーがあります:[....]、 –
私はプロバイダへのディレクティブとその作業を変更します –