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