I am trying to use the progressbar.js library from npm in my Angular 2 application which uses Angular-CLI.
I installed it with npm install progressbar.js --save. The documentation of progressbar.js says to use it with var ProgressBar = require('progressbar.js'), which I can't use because I don't have SystemJS.
I searched a bit and found a solution to include it in the scripts array of the angular-cli.json, which I did:
"scripts": [
"../node_modules/progressbar.js/dist/progressbar.js"
],
The application compiles fine with ng serve, but I really couldn't figure how to make use of the included library. In my component I tried different import statements like import * as Progressbar from 'progressbar.js/dist' or import { Progressbar } from 'progressbar.js/dist' but didn't get any of them to work.
Does anyone know how I can use this library?