avik avik - 7 months ago 23
jQuery Question

How to design index.html file in cordova?

I am newbie to cordova. I understood the folder structure and build process and other things in cordova except the index.html file. My question is how should I design index.html file. How at a time one page/div can be shown ?
I am having three questions.

  1. Do I need to create SPA ?

  2. Can I load different html file through jquery ?

  3. Creating different divs?

Sorry for being unable to make the question more clear and specific.


index.html is the app's starting page more like a home page for a web application.

Answering to your other questions, its not mandatory to create Cordova application as a SPA. Also if you wanna load any other html by default other than index.html, you can configure the same in application's config.xml as follows,

<content src="startPage.html"></content>

Ensure that startPage.html is available in project root folder. Recommend you to go through this offical documentation for more info.