ngx-scanner
ngx-scanner copied to clipboard
property 'forRoot' does not exist on type 'typeof ZXingScannerModule'.?
My angular cli version details Angular CLI: 6.2.9 Node: 8.9.1 OS: win32 x64.
On installing the package and including
// Common imports import { NgModule /* , ... */ } from '@angular/core';
// Import the package's module import { ZXingScannerModule } from '@zxing/ngx-scanner';
@NgModule({ declarations: [ /* AppComponent ... */ ], imports: [
// BrowserModule,
// ...
// ZXing scanner module
ZXingScannerModule.forRoot(),
// another imports...
],
// ...
}) export class AppModule { }
It does not exist and must be removed from docs. Just avoid it.