Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dropzone js with angular 4

Is anyone used dropzone Js library with angular 2 or 4 before ? and if there is some useful examples or links thanks

like image 257
Abdelrahman Hussien Avatar asked Aug 26 '17 19:08

Abdelrahman Hussien


2 Answers

There is an Angular 5+ wrapper for Dropzone that can be found here.

like image 98
dvlsc Avatar answered Oct 12 '22 13:10

dvlsc


Maybe it's a bit late, after some research I found these info to make work dropzone 5.0.2 with Angular 5:

  • put dropzone.js library under src/js/ (create the js dir, if not already created)
  • add js/dropzone.js in the list of scripts in .angular-cli.json
  • As described here, run the following command in cmd/shell, at the root of your angular project (where .angular-cli.json is located):

    npm install --save @types/dropzone
    
  • Now you are able to import dropzone in your typescript classes like this:

    import * as dropzone from 'dropzone';
    

You may also integrate it as an Angular component (Angular 2+) like described it this article.

WARNING: I didn't test it, thus, maybe, something is missing or wrong. I finally used another library.

like image 44
Aymen Turki Avatar answered Oct 12 '22 13:10

Aymen Turki