title: Angular5: Dygraph is not defined in runtime
body: <p>Using Angular 5 combined with dygraphs library, in runtime I receive an error: 'Dygraph is not defined', although dygraphs library is installed.</p>
  
  <p>component.ts file:</p>
  
  <pre><code>import { Component, AfterViewInit } from '@angular/core';
  
  declare var Dygraph: any;
  
  @Component({
  ...
  })
  export class MyComponent implements AfterViewInit {
  
    constructor() {
    }
  
    ngAfterViewInit() {
        let div = document.getElementById('divId');
        new Dygraph(div, "Time,Value\n", {});
    }
  }
  </code></pre>
  
  <p>component.html file:</p>
  
  <pre><code>&lt;div id="divId"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>package.json file:</p>
  
  <pre><code> "dependencies": {
      ...
      "dygraphs": "^2.1.0",
    },
  </code></pre>
  
  <p>Is it possible to use pure dygraphs with Angular2+ ? There is ng-dygraphs library, but I would like to use pure dygraphs.</p>