ifeoluwa king
ifeoluwa king

Reputation: 531

Is phonegap index.js file really necessary in a web application?

Please am new to programming and am trying to build my first mobile app. the question is do i need the phonegap index.js file, cant i just write my code without it like normal jQuery code in a website? I don't really understand how to put the code in the index.js file.The code is very basic, nothing complicated. Thank you

Upvotes: 1

Views: 1392

Answers (1)

user3255670
user3255670

Reputation:

@ifeoluwa king,
only two files are needed to produce for Phonegap Build or Phonegap CLI. The two files are:

  1. index.html
  2. config.xml

The third file required file, which must be include in the index.html, is phonegap.js. With Phonegap Build, the system automatically provides the file. With Phonegap CLI, I have no experience with this, but according to this blog post it has been added to your bundle. In addition, you NEED TO SWITCH THE NAME to cordova.js - Again, read the blog post for details.

Appended 2015/09/02 On the original question, index.js is NOT needed. The file is created as a default; other possible names include, default.js and app.js.

Upvotes: 1

Related Questions