angular-dropzone

WebJar for angular-dropzone

License

License

MIT
Categories

Categories

Angular User Interface Web Frameworks
GroupId

GroupId

org.webjars.bower
ArtifactId

ArtifactId

angular-dropzone
Last Version

Last Version

0.1.2
Release Date

Release Date

Type

Type

jar
Description

Description

angular-dropzone
WebJar for angular-dropzone
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/sandbochs/angular-dropzone

Download angular-dropzone

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bower/angular-dropzone/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>angular-dropzone</artifactId>
    <version>0.1.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/angular-dropzone/
implementation 'org.webjars.bower:angular-dropzone:0.1.2'
// https://jarcasting.com/artifacts/org.webjars.bower/angular-dropzone/
implementation ("org.webjars.bower:angular-dropzone:0.1.2")
'org.webjars.bower:angular-dropzone:jar:0.1.2'
<dependency org="org.webjars.bower" name="angular-dropzone" rev="0.1.2">
  <artifact name="angular-dropzone" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='angular-dropzone', version='0.1.2')
)
libraryDependencies += "org.webjars.bower" % "angular-dropzone" % "0.1.2"
[org.webjars.bower/angular-dropzone "0.1.2"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.bower : dropzone jar [3.10.2,3.11)

Project Modules

There are no modules declared in this project.

angular-dropzone

AngularJS directive for Dropzone.js

Installation

bower install angular-dropzone

Usage

html

Include bower_components/dropzone/downloads/dropzone.min.js and bower_components/angular-dropzone/lib/angular-dropzone.js in your html file. Also include bower_components/dropzone/downloads/css/dropzone.css for basic styling.

Add ngDropzone as a dependency to your module and initialize the Dropzone directive by including it in your template.

<div class="DemoController as ctrl">
  <form class="dropzone"
        method="post"
        enctype="multipart/form-data"
        ng-dropzone
        dropzone="ctrl.dropzone"
        dropzone-config="ctrl.dropzoneConfig"
        event-handlers="{ 'addedfile': ctrl.dzAddedFile, 'error': ctrl.dzError }">
  </form>
</div>

js

angular.module('DemoApp', ['ngDropzone'].controller('DemoController', ['$log', function($log) {
  var self = this;

  self.dzAddedFile = function( file ) {
    $log.log( file );
  };
  
  self.dzError = function( file, errorMessage ) {
    $log.log(errorMessage);
  };
  
  self.dropzoneConfig = {
    parallelUploads: 3,
    maxFileSize: 30
  };
}]);

To get a list of all the events, go to http://www.dropzonejs.com/#events and read through the events list.

Versions

Version
0.1.2