Sam YC
Sam YC

Reputation: 11617

Phonegap with javascript global variable

I am learning how to use phonegap now. I have a little bit experience in Android.

Since Android is Java-based, if we want to have global variable, we can simply define a static variable to handle it. So, we will be able to reference the static variable across all the activities in the app.

But phonegap is javascript-based, how am I going to create global variable that is able to be used across all the html pages?

Upvotes: 1

Views: 7414

Answers (1)

Dimse
Dimse

Reputation: 1506

Javascript offers Local Storage.

Take a look at this answer: Phone gap implementation of 'application settings'

Upvotes: 2

Related Questions