Closed Thabangtg closed 7 years ago
Two reasons this can happen...
var ZXing = require('nativescript-zxing');
before that code, correct?
2.. Do a FULL rebuild; you must do a full rebuild when adding a plugin. If you don't it will give you the undefined error.from my experience, Automatically when there is a new plugin installed and you tns livesync android --emulator it usually rebuilds it. Let me rebuild and ill get back to you. Thank you.
Hello Nathanael.
It works just fine.
Thank you.
Hello NathanaelA.
I saw your repo demo as a solution to what i need to implement for my practice, but then after i have followed all the instructions i got an error about zxing undefined on the declaration.
function loaded(args){ var zx = new ZXing(); var data = pageData.set('voucherNumber',voucher.id); var qr_code = zx.createBarcode({ encode: data, height: 100, width: 100, format: ZXing.QR_CODE }); var page = args.object; var voucher = page.navigationContext; pageData.set('amount',voucher.balance); pageData.set ('img', qr_code); page.bindingContext = pageData; }
Help if there's something im missing. Thank You NathanaelA