Use ionic config


#1

Is it better to use ionic config for storing key value pair settings than ionic storage?


#2

What is this [quote=“payt1400, post:1, topic:89182”]
Ionic config
[/quote] you are talking about? Could you provide a link?


#3

I want the user to be able to switch some toogles in settingsmenu to change the apps appeareance.


#4

I don’t see any way to store anything using the Config of Ionic - that is a way to config some stuff in Ionic itself.

So Ionic Storage is definitely the better choice, as it actually allows you to store key value pairs.


#5

Thank you I missunderstod the concept of config.


#6

But combining the two of them seems like a good idea or am I way out? I thought that when im setting some values I save them to storage and loading them from config.


#7

So, the docs have this to say about config:

The Config lets you configure your entire app or specific platforms. You can set the tab placement, icon mode, animations, and more here.

So you don’t load anything from config, instead this is how you change settings of Ionic.


#8

I mean if I want to change color of the tabs I can first use storage.set(blue) and at startup use config.set from storage.get(blue). Im a beginner so havent figured everything out.


#9

Yes, this makes sense.