JSBarcode integration with Ionic 5
问题 i am integrating JSbarcode with ionic 5. I am using @ViewChild for barcode element in html. but the issue is that i will get undefined for viewchild because viewchild is accessed before view is completely loaded in html. i tried with ngafterviewinit, but still it didn't work. Only thing worked for me was setTimeout as shown below. getBarcode(){ setTimeout(()=>{ this.generateBarcode(this.barcode); },2000) } But setTimeout differs in speed across various devices hence in few devices barcode was