Ionic and Local Storage? (Saving some simple settings)

Hi.

I was creating an app and needed to save some settings: http://i.imgur.com/rtQZFEp.png

I thought to myself: What’s the best way to store this settings?
Answer: Since I’m using “web technologies” I will use the “Local Storage” thing that is available in the browsers/phones (webview)

So I found an Angular Module to help me: https://github.com/grevory/angular-local-storage

The problem: On my Chrome browser it works perfectly. On my phone (OnePlus One) doesnt seem to be able to store anything… (closing the app loses everything)

“Partial solution:” A coworker showed me another module: https://github.com/gsklee/ngStorage
This one seems to works, but I’ve already coded the app using the first one…

Question: How would you guys store those “simple” settings on the device?

Thanks for your help!

I use this simple factory:


I think there is no need to use other modules, handling localstorage is pretty simple

I’ve stopped using both libraries and only used “your code” (more precisely the one in the documentation: http://learn.ionicframework.com/formulas/localstorage/) and it’s working…!

Yep it’s a super effective factory Max made, I just added the clear method.