StarterSquad / ngseed

167 stars 48 forks source link

Using with Phonegap #23

Closed NEOLPAR closed 10 years ago

NEOLPAR commented 10 years ago

I want to use this project with Phonegap but when I try to run in Android device, I have this error:

05-07 13:55:38.008: E/Web Console(10987): Uncaught Error: Script error for: angular 05-07 13:55:38.008: E/Web Console(10987): http://requirejs.org/docs/errors.html#scripterror at file:///android_asset/www/libs/require.js:138

05-07 13:55:45.058: E/Web Console(10987): Uncaught Error: Load timeout for modules: ui.router 05-07 13:55:45.058: E/Web Console(10987): http://requirejs.org/docs/errors.html#timeout at file:///android_asset/www/libs/require.js:138

I changed the load time in require config, but this was not the problem. Anyone can help me to configure it.

Maqsim commented 10 years ago

@NEOLPAR Did you change something there? I mean config, main.js

NEOLPAR commented 10 years ago

@Maqsim Yes, but when I saw the code not work in Phonegap, I have tested with the original code without changes and I have the same problem.

I have error with angular: 05-08 08:27:52.278: E/Web Console(14591): Uncaught Error: Script error for: angular

And when It can't load, the rest that depend of angular, throw exception: 05-08 08:27:59.308: E/Web Console(14591): Uncaught Error: Load timeout for modules: ui.router

dmitryevseev commented 10 years ago

Looks like you need to run bower install

NEOLPAR commented 10 years ago

I have changed config-require with baseUrl: .......... define({ // Here paths are set relative to /source/js folder baseUrl: "./js", paths: { .......... and also changed './app' to '../app' in main.js

Now in Phonegap I have no load problems, but dont work when call to controllers.controller() in home-ctrl.js.

dmitryevseev commented 10 years ago

Also update paths for all modules injected in all components. Though I'm not sure if you really need to do that. Problem should be easier to solve and probably is related to your paths config, like you're serving app not from root url. I can't say for sure now without example.