So I couldn't figure out why grunt dev would work correctly in the browser but failed to copy all the resources to www in order to build correctly when emulating devices. I eventually tracked the error to this line in grunt.js
appDir: 'app/www',
which I am pretty sure should just be:
appDir: 'www',
When I changed it to www however, I started to get the following errors in the browser and on the devices:
GET http://0.0.0.0:9001/vendor.css 404 (Not Found) 0.0.0.0/:10
GET http://0.0.0.0:9001/app.css 404 (Not Found) 0.0.0.0/:11
GET http://0.0.0.0:9001/cordova.js 404 (Not Found) 0.0.0.0/:14
GET http://0.0.0.0:9001/endor.js 404 (Not Found) 0.0.0.0/:15
GET http://0.0.0.0:9001/g.js 404 (Not Found) 0.0.0.0/:16
GET http://0.0.0.0:9001/pp.js 404 (Not Found) 0.0.0.0/:17
GET http://0.0.0.0:9001/onfig.js 404 (Not Found) 0.0.0.0/:18
GET http://0.0.0.0:9001/odules.js 404 (Not Found) 0.0.0.0/:19
GET http://0.0.0.0:9001/irectives.js 404 (Not Found) 0.0.0.0/:20
GET http://0.0.0.0:9001/ilters.js 404 (Not Found) 0.0.0.0/:21
GET http://0.0.0.0:9001/ervices.js 404 (Not Found) 0.0.0.0/:22
GET http://0.0.0.0:9001/ontrollers.js 404 (Not Found) 0.0.0.0/:23
Uncaught ReferenceError: pg is not defined
You'll notice the url's are cut off. I was able to track this down to the application.tmpl to find this:
I had to fix the asset.substring(8) to be asset.substring(4) in src/html/layouts/application.tmpl in order to work. Maybe there's a better way to do this?
So I couldn't figure out why
grunt dev
would work correctly in the browser but failed to copy all the resources towww
in order to build correctly when emulating devices. I eventually tracked the error to this line ingrunt.js
appDir: 'app/www',
which I am pretty sure should just be:
appDir: 'www',
When I changed it to www however, I started to get the following errors in the browser and on the devices:
You'll notice the url's are cut off. I was able to track this down to the application.tmpl to find this:
I had to fix the
asset.substring(8)
to beasset.substring(4)
insrc/html/layouts/application.tmpl
in order to work. Maybe there's a better way to do this?