Reputation: 397
How can I change Apache Cordova's working directory to something other than www? Changing <content src="src/index.html"/>
in config.xml did not work.
Upvotes: 7
Views: 4297
Reputation: 89547
Here is what documentation for ionic-cli says about Serving an alternative document root
If you'd like to test your app in the browser and you use a folder other than the default of www, you can specify this folder in your ionic.project file.
Example:
{
"name": "SmoothRiders",
"gulpStartupTasks": [
"watch"
],
"documentRoot": "app",
"watchPatterns": [
"app/js/*",
"!app/css/**/*"
]
}
Upvotes: 7
Reputation: 3678
I hate to be the bearer of bad news, but I don't believe it's possible to modify the root folder through the config.xml configuration file (at least in the current version as of Jan. 2015). The source code for the various platforms were written with the assumption that 'www' will be the Web view's root content folder. I do suppose it would be possible to hand-modify the source post-prepare, but I strongly recommend against it.
Upvotes: 2