ng-dropzone icon indicating copy to clipboard operation
ng-dropzone copied to clipboard

Is it possible to access dropzone programmatically while still using this directive?

Open schester44 opened this issue 7 years ago • 1 comments

im trying to do something like

myDropzone.emit( "addedfile", file );

but I can't figure out how to access that emit method.

EDIT... I was able to make it work like this:

in ngdropzone/dist/ng-dropzone.js:

//Instantiate dropzone with initOps
var dropzone = new Dropzone(iElem[0], initOps);
scope.instance = dropzone

then in my component...

<ng-dropzone
    instance="$ctrl.myDropzone"  /// the dropzone instance is available via $ctrl.myDropzone
    options="$ctrl.dzOptions"
    callbacks="$ctrl.dzCallbacks"
    methods="$ctrl.dzMethods">
</ng-dropzone>

would you accept a PR for something like this or do you have a better suggestion?

schester44 avatar Oct 27 '17 02:10 schester44

duplicate of #4

schester44 avatar Oct 27 '17 02:10 schester44