1.0.2 • Published 6 years ago
a-dropzone v1.0.2
A-Dropzone
Angular lib wrapper for Dropzonejs
Install
npm install --save a-dropzone
Usage
- Import the module in your module.
import { ADropzoneModule } from 'a-dropzone';
@NgModule({
...
imports:[ADropzoneModule]
...
})
- Include the js and the css in your .angular-cli.json
...
"styles": [
"../node_modules/dropzone/dist/dropzone.css"
],
"scripts": [
"../node_modules/dropzone/dist/dropzone.js"
]
...
- Use it in the component
<form class="dropzone" a-dropzone [options]="{url: yourBackendUrl}">
</form>
- All catch all events easy, if you want to catch addedfile event just call the output:
<form class="dropzone" a-dropzone (addedfile)="onAddedFile($event)" [options]="{url: yourBackendUrl}">
</form>
You can set any dropzone option in Dropzone Docs