We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2914460 commit 97f62d5Copy full SHA for 97f62d5
src/pages/hi-ionic/hi-ionic.ts
@@ -7,6 +7,8 @@ import { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner';
7
templateUrl: 'hi-ionic.html'
8
})
9
export class HiIonicPage {
10
+ scanSub: any;
11
+
12
constructor(public navCtrl: NavController,
13
private qrScanner: QRScanner) {
14
@@ -19,11 +21,9 @@ export class HiIonicPage {
19
21
console.log('Camera Permission Given');
20
22
23
this.scanSub = this.qrScanner.scan().subscribe((text: string) => {
-
- console.log('Scanned something', text);
24
- this.qrScanner.hide();
25
- scanSub.unsubscribe();
26
+ console.log('Scanned something', text);
+ this.qrScanner.hide();
+ this.scanSub.unsubscribe();
27
});
28
29
this.qrScanner.show();
0 commit comments