ng2-file-upload
exports 3 directives:fileSelect
,fileDrop
andimgPreview
.
<input type="file"
fileSelect
[uploader]="uploader"
multiple>
uploader
- uploader object.
<div class="drop-zone"
fileDrop
(fileOver)="fileOver($event)"
[uploader]="uploader">
</div>
uploader
- uploader object.
<div class="img-preview"
imgPreview
[image]="item?._file">
</div>
imgPreview
set the background image url on element.
image
- File added to uploader's queue
In order to use this module inside your Angular project, set the SystemJS config:
ng2-file-upload: {
main: 'file-upload.module.js',
defaultExtension: 'js'
}