Home ng-droplet drag and drop file uploader in Angularjs
Reply: 0

ng-droplet drag and drop file uploader in Angularjs

user916 Published in June 19, 2018, 2:43 pm

I am trying to add a drag and drop file upload.I am using ng-droplet. The documentation states that event needs to be binded on controller this way:

  $scope.$on('$dropletReady', function whenDropletReady() {
            $scope.interface.allowedExtensions(['png', 'jpg', 'bmp', 'gif', 'svg', 'torrent']);

I need to use the event without $on just like simple method call Angularjs, i.e. in html we have

<droplet ng-model="$ctrl.interface" dropletReady="ctrl.whenDropletReady()"> </droplet>

and somehow I could bind a function defined in controller to this droplet.Can this be done? I am new to Angularjs. Hence some insight would be helpful.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.30822 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO