Options
All
  • Public
  • Public/Protected
  • All
Menu

Class QRCode

Hierarchy

Implements

Index

Constructors

constructor

  • new QRCode(type: QRCodeType, networkType: NetworkType, generationHash: string, base64?: string): QRCode
  • Construct a QR Code instance out of its base64 representation and type.

    Parameters

    • type: QRCodeType
    • networkType: NetworkType
    • generationHash: string
    • Optional base64: string

    Returns QRCode

Properties

Optional base64

base64: string

generationHash

generationHash: string

The network generation hash.

var

{string}

networkType

networkType: NetworkType

The network ID.

var

{number}

type

The QR Code type.

var

{QRCodeType}

Methods

getCorrectionLevel

  • The getCorrectionLevel() method should return the QR Code correction level.

    Sub-classes may overload this method to provide with a different correction level.

    Returns CorrectionLevel

Abstract getSchema

  • The getSchema() method should return an instance of a sub-class of QRCodeDataSchema which describes the QR Code data.

    Returns QRCodeDataSchema

Abstract getTypeNumber

  • getTypeNumber(): number
  • The getTypeNumber() method should return the version number for QR codes of the underlying class.

    Returns number

toBase64

  • Generate QRcode image Base64.

    The returned string can be put in the src attribute of a <img /> tag directly in HTML. The produced image will be a PNG.

    Parameters

    • Default value settings: QRCodeSettings = new QRCodeSettings()

      (Optional) Settings for generation

    Returns Observable<string>

    Return image data in Base64.

toCanvas

toJSON

  • toJSON(): string

toObject

toString

Generated using TypeDoc