You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first one depends in the "checkSupport" method on the "deviceready" event of Cordova.
The second one just tells that the support is guaranteed everytime. The last was created due to a bug, that the "deviceready" event is sometimes not fired in Steroids and Ionic.
With Angular you would first configure the localForageProvider.
It could look like this:
// Example
angular.module('<REPLACE_ME_WITH_MODULE_NAME>')
// The important part
// driver could be the single 'cordova-sqlite-plugin' or with some alternatives
// size can be defined, in this example 100mb
.config(['$localForageProvider', function($localForageProvider) {
$localForageProvider.config({
driver: ['asyncStorage',
'cordova-sqlite-plugin',
'webSQLStorage'
],
size: 100 * 1024 * 1024
});
}])
// in the controller/service you could use it like this
.service('<REPLACE_ME_WITH_SERVICE_NAME>',
function($localForage, $q) {
var lcReturn = {};
lcReturn.get = function(pKey) {
return $localForage.getItem(pKey);
};
// other service methods..
return lcReturn;
});
```