(As suggested by George Stocker in the comments I've edited this question so that it is now about angular-qrcode instead of QRCode.js.)
I'm trying to use angular-qrcode to display qr-codes in Angular, but I can't get it to work. I'm currently simply trying this code as described in the readme:
<qrcode data="string"></qrcode>
Unfortunatel it doesn't do anything. I don't get any error, but I don't see any qr-image either.
To give a working example I forked the angular-phonecat tutorial here and tried using angular-qrcode in that code (commit here).
Does anybody know what I'm doing wrong trying to use angular-qrcode? All tips are welcome!
Never access the DOM in the controller, use directives for that.
Instead of creating your own directive you might want to have a look at Angular-qrcode.
The short version of how to use this library is just this:
<qrcode data="{{url}}"></qrcode>
To get this to work you need to include both the original qr-code generator and the angular wrapper (angular-qrcode) scripts in your html. Also remember to add 'monospaced.qrcode'
as a module-dependency.