Andrew Peacock
Posts: 0
Joined: Thu Jan 09, 2014 10:03 pm

Settings service storage

Just a quick one: where are the values for settings services stored (in an Angular app). I can't see them in localstorage, so I guess not there.

Regards,
Andy

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Settings service storage

Hello Andrew,

They are keeping in the JS file constants.js. And you can read them with method:
Apperyio.Config.get();
More information here:
https://devcenter.appery.io/documenta...

Andrew Peacock
Posts: 0
Joined: Thu Jan 09, 2014 10:03 pm

Settings service storage

Hi Sergiy,
Thanks for clarifying. That's what confused me - currently I'm testing this in the standard test more in the browser. However, once the app is compiled to an APK file, if I use Apperyio.Config.add(), does that mean the constants.js file changes on the mobile device?
Regards,
Andy

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Settings service storage

No,
Appery.io reads that file when app is loading.
After that you can manipulate with configs (add/remove) as variables in the RAM. Nothing is writting to the file or localStorage.
So after each execution of the app these configs set with default values (from the constants.js)

Andrew Peacock
Posts: 0
Joined: Thu Jan 09, 2014 10:03 pm

Settings service storage

Ah, ok, thanks Sergiy. I'll use the AppPreferences cordova plugin instead, as I need to save changes permanently.

Regards,
And

Return to “Issues”