So I have an SPA in angular. I want to insert a QR code, using a jquery plugin.
All my controllers and my javascript are in my index.html
. When user visits screen.html
or keybord.html
, there is another small page inside those pages
the controller of qr.html
has
jQuery('#cardQR').qrcode({
text :"yo"
});
When I first go to screen.html
the QR is there, if I go to keybord.html
or go back to screen.html
the QR renders for half a second and gets lost.
I guess the QR jquery plugin gets loaded once in index.html
and never again because index does not reloads again, only screen or keybord. I may be wrong.
I dont know how to fix this. Any tips?
Thanks