javascript - Cordova - Onsen UI won't execute scripts -


i'm using cordova pure javascript.
i'm trying ons.ready() execute javascript file called ui.js, except doesn't work.
looks this:

document.addeventlistener("domcontentloaded", function () {     // executes line     ons.ready(function () {         // nothing executes here     }); }); 

the thing is, doesn't work when execute on android device - when tried execute script in localhost in browser, worked.
, since version doesn't work android 1 - cannot debug app try understand how fix it.

if it's relevant, i'm using intellij idea edit cordova app, manage node.js packages.

thanks help!

i solved problem removing document.addeventlistener("domcontentloaded") part.
result:

ons.ready(function () {     // code goes here }); 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -