This is what I did to make it work:
Step Zero: Include the CSS and JS file in the angular-cli.json
file.
"styles": [
"../node_modules/fine-uploader/fine-uploader/fine-uploader-gallery.min.css"
],
"scripts": [
"../node_modules/fine-uploader/fine-uploader/fine-uploader.min.js"
],
Step One:
Add /// <reference types="fine-uploader" />
on top of your component file.
Step Two: Declare following variables:
uploader: FineUploader.qq;
uiOptions: FineUploader.UIOptions;
coreEvents: FineUploader.CoreEvents;
Step Three:
Add UI options and initialise FineUploader in ngOnInit
this.uiOptions = {
element: document.getElementById('qq-template'),
template: "qq-template"
};
this.uploader = new qq.FineUploader(this.uiOptions);
Step Four:
Add the template HTML in your COMPONENT_NAME.component.html
file. You may find the HTML in node_modules/fine-uploader/fine-uploader/templates/