Skip to content

Ionic3 component that creates an out-of-the-box QR scanner GUI

Notifications You must be signed in to change notification settings

RaschidJFR/ionic-qrscanner-gui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ionic QR Scanner GUI

This component creates an out-of-the-box QR scanner GUI and manages the QRScanner Natove Plugin plugin in a straightforward way:

<qr-scanner color="white" [defaultOn]="true" (Scan)="onTextScanned($event)" #scanner></qr-scanner>

Usage

1 Install thi package:

$ npm install [email protected]:RaschidGithub/ionic-qrscanner-gui.git

2 Add the component to your app's main module:

// #app.module.ts

@NgModule({
	imports: [
		QrScannerComponentModule	// <-- Add this line
	],
	entryComponents: [
		MyApp,
		YourScannertPage,
	],
	//...
})

...or to the page's hosting the scanner (if it has a module definition file):

// #your-scanner-page.module.ts

@NgModule({
	declarations: [
		YourScannerPage,
	],
	imports: [
		IonicPageModule.forChild(DashboardPage),
		QrScannerComponentModule					// <-- Add this line
	],
	//...
})

3 Add the component's stylesheet into variables.scss:

@import 'node_modules/ionic-qrscanner-gui/dist/qr-scanner.scss';

Parameters

  • defaultOn:: If true, turns the camera on and starts scanning on startup. Default is true.
  • Scan: Event triggered on finding a text string in a QR code, passes the text as parameter.
  • color: Default color for the scanner's frame.

About

Ionic3 component that creates an out-of-the-box QR scanner GUI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published