ng-dropzone
ng-dropzone copied to clipboard
Is it possible to access dropzone programmatically while still using this directive?
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?
duplicate of #4