Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229600

Load JS files before anything else (jQuery and other JS libraries)

$
0
0

I will reply to myself :smiley: because I figured out a solution.

The transpile process was giving errors because the $ and the functions html5_qrcode and html5_qecode_stop were not being read from the JS files that I included in index.html in time. They were eventually, but not a the time the page .ts was being processed.

I bypassed the transpiler error by declaring both in the page .ts file (like you would with prototypes):

declare var $: any;
declare function html5_qrcode(any);
declare function html5_qrcode_stop(any);

Not sure it’s the best solution, but it is one.
Hope this helps someone :slight_smile:


Viewing all articles
Browse latest Browse all 229600

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>