Open elkhalifte opened 5 years ago
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.
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.