PhoneGap / Cordova 1.6 and dojo 1.7.2 AMD works fr

2019-08-01 16:29发布

问题:

I have recently upgraded my PhoneGap/dojo1.6 app to cordova 1.6 and everything works just fine.

Then I upgraded to dojo 1.7.2 using hosted dojo: [script src="http://ajax.googleapis.com/ajax/libs/dojo/1.7.2/dojo/dojo.js" data-dojo-config="async: true"][/script]

And again, everything works fine.

But when I tried to use local dojo, much like I did when using dojo1.6 and cordova1.6, the dojo.js is found and loaded, but the app won't start/load other dojo module files.

[script src="dojo1.7.2/dojo/dojo.js" data-dojo-config="async: true"][/script]

I ended copying the entire dojo1.7.2 (didn't build anything), but still the app won't load and I get no error messages in the console.

Does anyone have any idea what might be the problem?

Thanks in advance, Guy

回答1:

Try using the following config in your dojo [script src=]:

data-dojo-config="async:false,parseOnLoad:true"

Also include the cordova.js file BEFORE the dojo.js file.



标签: cordova dojo amd