-
-
Notifications
You must be signed in to change notification settings - Fork 232
Getting Started
Luiz Machado edited this page Apr 25, 2018
·
8 revisions
To install this package, run:
yarn add @zxing/ngx-scanner@latest
or
npm i @zxing/ngx-scanner@latest --save
Then import it into your Angular Module
, see Usage.
If you experience problems upon installing the component, please run
npm install --global --production windows-build-tools
and try again. If the problem still occurs, file an issue.
Import it on your module file:
// some.module.ts
import { NgModule } from '@angular/core';
// your very important imports here
// the scanner!
import { ZXingScannerModule } from '@zxing/ngx-scanner';
// your other nice stuff
@NgModule({
imports: [
// ...
// gets the scanner ready!
ZXingScannerModule,
// ...
]
})
export class SomeModule {}
Put the component in the interface:
<!-- some.component.html -->
<zxing-scanner></zxing-scanner>
And that's it! 😉