I have made a QR scanner app using Ionic-Angular. I can read the Vcard but not extract and save the details. please help me out. Provided below are the home.page.html & home.page.ts files Code for the home.page.html file :

  <ion-toolbar color="primary" >
      Kveso QR Scanner

        <ion-card-header>Result :</ion-card-header>
          <ion-item *ngIf="scannedCode">
              {{ scannedCode }} 
          <ion-button (click)="scanCode()" fill="outline" id="btn-enter" size="default" ><ion-icon name="qr-code-outline" slot="start"></ion-icon>
              Scan Again</ion-button>

here is the home.page.ts file :

import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx'
import { NavController } from '@ionic/angular';
import { NullVisitor } from '@angular/compiler/src/render3/r3_ast';
  selector: 'app-home',
  templateUrl: 'home.page.html',
  styleUrls: ['home.page.scss'],
export class HomePage {
  scannedCode: string="";

  constructor(private barcodeScanner : BarcodeScanner,
    private navCtrl : NavController) {}

      barcodeData => {
        this.scannedCode = barcodeData.text;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.