Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 230523

Dynamic key value for SQLite storage?

$
0
0

so instead, I tried this:

this.storage.set(option.name, this.option);

It works however it throws an error in console:

undefined used as a key, but it is not a string.

and it saves data under ‘undefined’. It can’t store more than one… if I save another, previous will disappear.

EDIT: I finally got it working by using option.id … it looks like key should be a simple number, not string or text. option.id works perfectly well now. Thanks a lot!


Viewing all articles
Browse latest Browse all 230523


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>