ben-ng / phonegap-air

Put your web app in the iOS App Store and update it whenever you want.
304 stars 26 forks source link

the content src in config.xml problem #9

Closed wliment closed 8 years ago

wliment commented 9 years ago

my phonegap code work in chrome browser and android and orginal phonegap framwork,

but now it has some problem with phonegap-air if i set the content start page with a subdir , example: pages/login.html)
content src="pages/login.html"

the content of pages/login.html will not loaded excpet hte login.html ;

src="images/login_logo.png" not load in pages/login.html the images dir is a subdir in pages dir.

image

if i change this to src="pages/images/login_logo.png" the login_logo.png will show in pages/login.html page.

ben-ng commented 9 years ago

Yes, all paths are made relative to the app root because the index src is loaded as if it was at the app root.

wliment commented 9 years ago

@ben-ng i sovle this issue , i add a file in root named index.html and redirect it to /pages/login.html, so now all file loaded correct

ben-ng commented 9 years ago

Thanks for the follow up. Running web code on phonegap doesn't follow the same rules that you expect on a server because of the filesystem.