Hello,
I tried to implemented the exemple as describe on the github page (https://embed.plnkr.co/MN4riU/).
But I always got the same probleme with my app.component.ts page, at the line:
import { NgxZxingComponent } from '@zxing/ngx-scanner';
Error:
/@zxing/ngx-scanner/zxing-ngx-scanner"' has no exported member 'NgxZxingComponent'.
Maybe someone already had this problem and fixed it :)
thanks in advance
Jacques
I'm afraid your config.js file is not right:
'@zxing/ngx-scanner': 'npm:@zxing/ngx-scanner@latest/bundles/ngx-scanner.umd.js',
'@zxing/library': 'npm:@zxing/library@latest'
This seems wrong.
Also, take a look at a working example at https://minhahavan.com or https://zxing-ngx-scanner.stackblitz.io. 馃檪
Hello Odahcam
Im working on Angular 6 so I don't think I have an config.js file.
Do you know if I have to place you code somewhere else?
'@zxing/ngx-scanner': 'npm:@zxing/ngx-scanner@latest/bundles/ngx-scanner.umd.js',
'@zxing/library': 'npm:@zxing/library@latest'
Thx :)
Well, the file is in the Plunkr example you sent. Now I'm confused. 馃槙
My bad, I used the bad exemple
So I tried wuth the github folder directly on my laptop, npm install then npm start --> no problems, everything works
Then I tried to import it on my project, but I got an error when i wanna use
<zxing-scanner #scanner class="test-class" [scannerEnabled]="scannerEnabled" [torch]="torch" [device]="selectedDevice" (camerasFound)="displayCameras($event)" (scanSuccess)="handleQrCodeResult($event)" [cssClass]="{customClass:true}"></zxing-scanner>
in my app.component.html
maybe I imported badly the module but I copy the exact line in app.component.ts and app.module.ts :/
Whats the error?
No follow up, so closing.
you must use import { ZXingScannerComponent } from '@zxing/ngx-scanner';
not import { NgxZxingComponent } from '@zxing/ngx-scanner'; in angular6
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
you must use import { ZXingScannerComponent } from '@zxing/ngx-scanner';
not import { NgxZxingComponent } from '@zxing/ngx-scanner'; in angular6