Open GianlucaBobbio opened 8 years ago
I was having the same problem and i solve it using "try" and "catch"
try {
this.articlesInstance=$localForage.instance('articles');
}
catch(err) {
this.articlesInstance = $localForage.createInstance({
name: 'articles'
});
}
I hope it helps you
Thanks, good idea. I finally did on another way (old project, cant remember)
Im on Ionic, I need a DB to work on, with and without connection. My Q is, I need 2 instances of localForage, so how do I put in angular.run() that? I tried
But it's not working (its first time so localForage.instance('Inspections') doesn't exist, but crush instead returning null)