Created
November 30, 2019 22:51
-
-
Save talcual/f8bbc16dd2b943a2c09f28bc42d9e047 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ionApp = <HTMLElement>document.getElementsByTagName('ion-app')[0]; | |
const startScanner = () => { | |
scanSub = this.qrScanner.scan().subscribe((text: string) => { | |
console.log(text); | |
}); | |
this.qrScanner.show(); | |
ionApp.style.display = 'none'; | |
}); | |
const closeScanner = () => { | |
this.qrScanner.hide(); | |
scanSub.unsubscribe(); | |
ionApp.style.display = 'block'; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment