If your component module is called a-demo.module, your component is called print.component.ts
Check the usage method and introduce it in the module of the current component
src\app\routes\a-demo\a-demo.module.ts
import { NgModule } from '@angular/core';
import { QRCodeModule } from 'angular2-qrcode';
...
@NgModule({
imports: [
QRCodeModule,
...
]
})
src\app\routes\a-demo\print\print.component.ts
<div>
<qr-code [value]="'All QR Code data goes here!'" [size]="150"></qr-code>
</div>
If you still report an error, check whether your component is in the current module's routing and the module is registered
src\app\routes\a-demo\a-demo-routing.module.ts
import { NgModule, Type } from '@angular/core';
import { QRCodeModule } from 'angular2-qrcode';
import { ADemoRoutingModule } from './a-demo-routing.module';
import { PrintComponent } from './print/print.component'; // Focus on observing this code, have you written
const COMPONENTS: Array<Type<void>> = [PrintComponent]; // Focus on observing this code, have you written
@NgModule({
imports: [QRCodeModule, ADemoRoutingModule],
declarations: COMPONENTS
})
export class ADemoModule { }
over!