title: Not able to load an image in Angular 6 using cornerstonejs
body: <p>I'm relatively new to Angular 6.
  I am trying to include <a href="https://github.com/cornerstonejs/cornerstone" rel="nofollow noreferrer">cornerstonejs</a> in my Angular 6 application. But I am encountering this error:</p>
  
  <blockquote>
    <p>error TS7016: Could not find a declaration file for module 'cornerstone-core/dist/cornerstone.js'</p>
  </blockquote>
  
  <p>I have installed cornerstone-core using <code>npm install cornerstone-core</code>.</p>
  
  <p>Can someone point out, why this code is not working?</p>
  
  <p><strong>component.ts</strong></p>
  
  <pre><code>import { Component, ElementRef, ViewChild, OnInit, AfterViewInit } from '@angular/core';
  import * as cornerstone from 'cornerstone-core/dist/cornerstone.js';
  
  @Component({
    selector: 'image-stack-viewer',
    templateUrl: './image-stack-viewer.component.html',
    styleUrls: ['./image-stack-viewer.component.css']
  })
  export class ImageStackViewerComponent implements OnInit, AfterViewInit {
    @ViewChild('testpod') canvasDiv: ElementRef;
  
    constructor() { }
  
    ngOnInit() {
    }
  
    ngAfterViewInit() {
      const imageId = ''//my-mage-url;
  
      var element = this.canvasDiv;
      cornerstone.enable(this.canvasDiv);
      cornerstone.loadImage(imageId).then(function (image:any) {
        cornerstone.displayImage(element, image);  
      });
    }
  }
  </code></pre>
  
  <p><strong>Html</strong></p>
  
  <pre><code>&lt;div #testpod width="500" height="400"&gt;&lt;/div&gt;
  </code></pre>