This page is a work in progress.
PrefsService - Preferences Service
PrefsService is an Angular Factory in the Util module with the name prefs.js
. It provides an API to manage preferences using the $cookies service. To use these functions, see the documentation on injecting Angular services.
Name | Summary |
---|---|
getPrefs | Gets a cookie with a specific name's value. |
asNumbers | Converts string values to numbers for all or selected keys. |
setPrefs | Sets the cookie preferences as a string into the cache. |
Function Descriptions
getPrefs
Gets a cookie with a specific name's value.
Example Usage | Arguments | Return Value |
---|---|---|
ps.getPrefs(name ); | name - string of the name of the cookie that you want | an object representing the cookie that you requested, the format being:
|
asNumbers
Converts string values to numbers for all or selected keys.
Example Usage | Arguments | Return Value |
---|---|---|
ps.asNumbers(obj , keys ); |
|
setPrefs