avik avik - 2 years ago 116
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.

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download