DEV Community ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป

Naim Malek
Naim Malek

Posted on • Updated on

Angular10 Qrcode generator library lightweight

an-qrcode

an-qrcode is Angular6-10 QR Code library to generate QR Codes in Angular 6/7/8/9/10 app.

Demo App

You can find demo app here
github.com/naimmalek/an-qrcode-sample-app.

npm url an-qrcode

Installation

# Angular 6/7/8/9/10
npm install an-qrcode --save

Basic Usage

Import the module and add it to your imports section in your main AppModule:

// Main Module File: app.module.ts
import { AnQrcodeModule } from 'an-qrcode';

@NgModule({
declarations: [
  AppComponent
],
imports: [
  AnQrcodeModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }

Examples: an-qrcode

Generate a QR Code from a string

here is sample code for generate qrcode

<qrcode [level]="1" [qrvalue]="'QR Code String'"></qrcode>

Parameters

Attribute Type Default Description
level Number 1 QR ECC level (1, 2, 3, 4)
qrvalue String '' Your String
width Number 200 Width (any value)
height Number 200 Height (any value)

Naim Malek (naimmalek.github.io)

Top comments (1)

Collapse
 
whyboris profile image
Boris

Superb! So easy to use! Thank you!

Create an Account!
Now it's your turn!
ย 
๐Ÿ—’ Share a tutorial
๐Ÿค” Reflect on your coding journey
โ“ Ask a question

Create an account to join hundreds of thousands of DEV members on their journey.