SteveStrong / ngFoundry

network modeling tools for projects involving rule based configuration, product modeling, and design solution search optimization
1 stars 0 forks source link

add File Drop tool #56

Open SteveStrongApp opened 6 years ago

SteveStrongApp commented 6 years ago

https://www.npmjs.com/package/ngx-file-drop

Enabling File Drag import { Component } from '@angular/core'; import { FileDropModule, UploadFile, UploadEvent } from 'ngx-file-drop';

@Component({ selector: 'demo-root', templateUrl: './app.component.html', styleUrls: ['./app.component.scss'] }) export class AppComponent {

public files: UploadFile[] = [];

public dropped(event: UploadEvent) { this.files = event.files; for (var file of event.files) { file.fileEntry.file(info => { console.log(info); }); } }

public fileOver(event){ console.log(event); }

public fileLeave(event){ console.log(event); } }