Files
NativeScript/apps/tests/application-settings.md
2016-04-14 15:20:35 +03:00

1.3 KiB

nav-title, title, description
nav-title title description
application-settings How-To How-To Examples for using application-settings

Application Settings

Using application settings methods requires to load "application settings" module.

Working with string, number and boolean values

Set and get boolean value and provide default value in case it is not set

Set and get string value

Set and get numeric value.

We use toFixed() here in order to avoid floating point errors - ex: 54.321 becoming 54.320999999537. Beware the result of toFixed() is a string not a number therefore you cannot use === or !== when comparing with a number.

Reading values that are not set before while providing default value

Reading values that are not set before not providing default value

Other functions

Checking for existence of value for key

Removing value for key

Removing all values