angular2-file-drop

WebJar for angular2-file-drop

License

License

MIT
Categories

Categories

JavaScript Languages Github Development Tools Version Controls Angular User Interface Web Frameworks
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

github-com-jellyjs-angular2-file-drop
Last Version

Last Version

0.0.3
Release Date

Release Date

Type

Type

jar
Description

Description

angular2-file-drop
WebJar for angular2-file-drop
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/jellyjs/angular2-file-drop

Download github-com-jellyjs-angular2-file-drop

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/github-com-jellyjs-angular2-file-drop/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>github-com-jellyjs-angular2-file-drop</artifactId>
    <version>0.0.3</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-jellyjs-angular2-file-drop/
implementation 'org.webjars.npm:github-com-jellyjs-angular2-file-drop:0.0.3'
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-jellyjs-angular2-file-drop/
implementation ("org.webjars.npm:github-com-jellyjs-angular2-file-drop:0.0.3")
'org.webjars.npm:github-com-jellyjs-angular2-file-drop:jar:0.0.3'
<dependency org="org.webjars.npm" name="github-com-jellyjs-angular2-file-drop" rev="0.0.3">
  <artifact name="github-com-jellyjs-angular2-file-drop" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='github-com-jellyjs-angular2-file-drop', version='0.0.3')
)
libraryDependencies += "org.webjars.npm" % "github-com-jellyjs-angular2-file-drop" % "0.0.3"
[org.webjars.npm/github-com-jellyjs-angular2-file-drop "0.0.3"]

Dependencies

compile (5)

Group / Artifact Type Version
org.webjars.npm : angular__core jar [2.0.0-rc.1,3)
org.webjars.npm : angular__platform-browser-dynamic jar 2.0.0-rc.1
org.webjars.npm : angular__compiler jar 2.0.0-rc.1
org.webjars.npm : angular__common jar [2.0.0-rc.1,3)
org.webjars.npm » fileapi jar [2.0.20,3)

Project Modules

There are no modules declared in this project.

angular2-file-drop

Angular2 component with Drag and Drop support for files

Install

npm install angular2-file-drop

Usage

import { Component, Output } from '@angular/core';
import { FileDropDirective } from 'angular2-file-drop';

@Component({
  selector: 'upload',
  template: `
    <div fileDrop
      [ngClass]="{'file-is-over': fileIsOver}"
      [options]="options"
      (fileOver)="fileOver($event)"
      (onFileDrop)="onFileDrop($event)">
      Drop file here
    </div>
  `,
  directives: [ FileDropDirective ]
})
export class PartiesUpload {
  public fileIsOver: boolean = false;
  @Output() public options = {
    readAs: 'ArrayBuffer'
  };

  private file: File;

  public fileOver(fileIsOver: boolean): void {
    this.fileIsOver = fileIsOver;
  }

  public onFileDrop(file: File): void {
    console.log('Got file!');
  }
}

Options

  • readAs? : DataURL, ArrayBuffer, BinaryString or Text
org.webjars.npm

JellyJS

Versions

Version
0.0.3