Skip to content
Luiz Machado edited this page Apr 21, 2018 · 8 revisions

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! 😉

Clone this wiki locally