title: Ionic QR Scanner returns previous value
body: <p>I have a problem with QR Scanner Ionic Plugin ( I tried a lot of versions )
  The problem is that the scanner returns the value of the previous scan, and of course the first scan is empty.</p>
  
  <pre><code>import { Component } from '@angular/core';
  import { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';
  @Component({
    selector: 'app-tab1',
    templateUrl: 'tab1.page.html',
    styleUrls: ['tab1.page.scss']
  })
  export class Tab1Page {
  
    constructor() {
      this.ionApp.style.display = 'block';
    }
    public error="Sample";
    public counter = 0;
    public ionApp = &lt;HTMLElement&gt;document.getElementsByTagName('ion-app')[0];
    public data= "";
    public startScanner(){
      QRScanner.prepare()
      .then((status: QRScannerStatus) =&gt; {
         if (status.authorized) {
           this.ionApp.style.display = ' none';
           // camera permission was granted
            QRScanner.show();
  
           // start scanning
           let scanSub = QRScanner.scan().subscribe((text: string) =&gt; {
             console.log('Scanned something', text);
              this.data = text;
             QRScanner.hide(); // hide camera preview
             scanSub.unsubscribe(); // stop scanning
             this.ionApp.style.display = 'block';
           });
  
         } else if (status.denied) {
           // camera permission was permanently denied
           // you must use QRScanner.openSettings() method to guide the user to the settings page
           // then they can grant the permission from there
         } else {
           // permission was denied, but not permanently. You can ask for permission again at a later time.
         }
      })
      .catch((e: any) =&gt;this.error = e); 
    }
  }
  
  </code></pre>