ngx-scanner
ngx-scanner copied to clipboard
Type 'ElementRef' is not generic
Bug, feature request, or proposal:
Error
What is the expected behavior?
I am able to run this scanner in Ionic 3
What is the current behavior?
There is an error preventing me:

Typescript Error
Type 'ElementRef' is not generic.
../node_modules/@zxing/ngx-scanner/lib/zxing-scanner.component.d.ts
previewElemRef: ElementRef<HTMLVideoElement>;
What are the steps to reproduce?
Providing a StackBlitz reproduction is the best way to share your issue.
StackBlitz starter: https://stackblitz.com/fork/zxing-ngx-scanner
- Follow the steps in Getting Started
- Run command in cmd
ionic serve - You will be presented with this error
What is the use-case or motivation for changing an existing behavior?
Nil
Which versions of Angular, ngx-scanner, OS, TypeScript, browsers are affected?
"@angular/animations": "5.2.11",
"@angular/common": "5.2.11",
"@angular/compiler": "5.2.11",
"@angular/compiler-cli": "5.2.11",
"@angular/core": "5.2.11",
"@angular/forms": "5.2.11",
"@angular/platform-browser": "5.2.11",
"@angular/platform-browser-dynamic": "5.2.11",
"@ionic-native/core": "3.14.0",
"@ionic-native/splash-screen": "4.20.0",
"@ionic-native/status-bar": "4.20.0",
"@ionic/storage": "2.2.0",
"@zxing/browser": "0.0.5",
"@zxing/library": "^0.18.3",
"@zxing/ngx-scanner": "3.0.0",
"ionic-angular": "3.9.9",
"ionicons": "3.0.0",
"rxjs": "6.0.0",
"rxjs-compat": "6.2.2",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.29"
"@ionic/app-scripts": "3.2.4",
"typescript": "3.1.1"
Is there anything else we should know?
You are probably using the wrong version of this component with Ionic or Angular.