Call function from AngularJs Directive for Dropzon

2019-07-23 12:40发布

问题:

I've this directive for the dropzone.js script: GitHub

This works fine but I want call the function processQueue() with a button. But I can't find how I can call this function!

回答1:

I found the answer by myself, juste add this line in the end of the directive :

scope.dropzone = dropzone;

And next you can call the function like that :

$scope.dropzone.processQueue();