We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I Have Used This Plugin cordova-plugin-nativestorage in My Phonegap app . The Plugin Works fine.
I Wonder If There Is any trick to get values from Nativestorage.getItem() without callbacks
This My Code i Call app.getstring('ref_string'); To get Saved Data in ref_string Key as an Alert.
When I Try To save it To Input Text as a Value I Got Undefined.
getstring:function(key){ ativeStorage.getString(key,function (result) { alert('String Is '+result);}, function (e) { alert('Error '+e);}); }
The text was updated successfully, but these errors were encountered:
The solution would be to wrap the methods in a promise. That would make them asynchronous.
const getItem = key => new Promise((resolve, reject) => NativeStorage.getItem(key, resolve, reject)) // in an async function const value = await getItem("key");
I didn't test it, but it's certainly the way to go.
Sorry, something went wrong.
No branches or pull requests
I Have Used This Plugin cordova-plugin-nativestorage in My Phonegap app . The Plugin Works fine.
I Wonder If There Is any trick to get values from Nativestorage.getItem() without callbacks
This My Code i Call app.getstring('ref_string'); To get Saved Data in ref_string Key as an Alert.
When I Try To save it To Input Text as a Value I Got Undefined.
The text was updated successfully, but these errors were encountered: