I'm having problems with the Ionic Storage.
When I log into my app, its saved on storage some configuration objects.
On my last check was on IndexedDb.
But if I save any file changes or simply refresh the page, sometimes it switches from IndexedDb to Web SQL...
All my data is "lost" because the DB is a fresh new one.
Anyone knows why its happening or how to solve.
This is my app.module storage settings
IonicStorageModule.forRoot({
name: '__cds',
driverOrder: ['indexeddb', 'sqlite', 'websql']
})
I'm afraid the repercussions on this when I compiled into an App.
So far I'm only on browser develop
That's how I set it
//response is an object I'm receiving from http call
this.storage.set('cds', response).then(() => {
this.goHome();
});
That's how I get it
this.storage.get('cds').then(cds => {
this.variable = JSON.parse(cds);
});
See, it's not "mantaining" the storage on a single db
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…