title: JsQRScanner in Angular5 Not Working
body: <p>JsQRScanner in Angular5 Not Working.
  I'm not sure I do right?</p>
  
  <p><a href="https://github.com/jbialobr/JsQRScanner" rel="nofollow noreferrer">https://github.com/jbialobr/JsQRScanner</a></p>
  
  <p>or Who knows how to do it?</p>
  
  <p>in angular-cli.json</p>
  
  <p>.js</p>
  
  <pre><code> "scripts": [
      "jsqrscanner.nocache.js"
    ],
  </code></pre>
  
  <p>.css</p>
  
  <pre><code>"styles": [
      "styles.css",
      "assets/css/JsQRScanner.css"
    ],
  </code></pre>
  
  <p>in scanner.component.ts</p>
  
  <pre><code>declare var JsQRScanner:any;
  </code></pre>
  
  <p>all scanner.component.ts</p>
  
  <pre><code>import { Component, OnInit,ViewChild,ElementRef } from '@angular/core';
  
  declare var JsQRScanner:any;
  
  @Component({
   selector: 'app-scanner',
   templateUrl: './scanner.component.html',
   styleUrls: ['./scanner.component.css']
   })
   export class ScannerComponent implements OnInit {
  
   @ViewChild('scanner')scanner:ElementRef;
   @ViewChild('scannedTextMemo')scannedTextMemo:ElementRef;
   @ViewChild('scannedTextMemoHist')scannedTextMemoHist:ElementRef;
  
   scannerView=this.scanner.nativeElement;
   scannedTextMemoView=this.scannedTextMemo.nativeElement;
   scannedTextMemoHistView=this.scannedTextMemoHist.nativeElement;
  
   constructor() { 
   //this. JsQRScannerReady();
   }
  
   onQRCodeScanned(scannedText)
   {
   var scannedTextMemo = this.scannedTextMemoView//////////
    if(scannedTextMemo)
    {
     scannedTextMemo.innerHTML = scannedText;
    }
   var scannedTextMemoHist =this.scannedTextMemoHistView; /////////////
   if(scannedTextMemoHist)
   {
    scannedTextMemoHist.value = scannedTextMemoHist.value + '\n' + scannedText;
   }
   }
  
   ngOnInit() {
  
   }
  
   ngAfterViewInit() {
     var jbScanner = new JsQRScanner(this.onQRCodeScanned);
  
     jbScanner.setSnapImageMaxSize(300);
     var scannerParentElement =this.scannerView; /////////////////////
  
     if(scannerParentElement)
     {
  
       jbScanner.appendTo(scannerParentElement);
     }    
   } 
  
  }
  </code></pre>