1

Is it possible to have multiple dataStore in IndexedDB using angular-localForage?

I tried this:

var $tblStage = $localForage.createInstance({
    storeName   : 'tblStage', // name of the table
});

but it triggered an error which says:

Error: A localForage instance with the name dbName is already defined.

I read this Question before but, is the only way is working with Raw IndexedDB? Or I missed something in my code? Any Idea?

1 Answer 1

0

Yes, only configure when you use. https://github.com/mozilla/localForage#configuration

But no its possible two instance at same db.

If you intend to use the directive, local-forage, you'll have to copy and configure it.

Just like this https://github.com/ocombe/angular-localForage/blob/master/src/angular-localForage.js#L51, for change the provide, only change defaultConfig at #L20, and name of angular module directive #L465.

And give more information but the reputation is very low and this leaves hook and my English so bad.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.