Вопрос

I'm using Trigger.io's forge.prefs module to store user options. The documentation refers to "default values" for preferences a few times:

forge.prefs.set(name, value, success, error)

The preference value given here will override a default value (if one was given).

However, I can't anything in the docs that actually says how to set this default value.

How do you set a default value for a preference?

Это было полезно?

Решение

Have a look at the trigger.io tutorial on creating a weather app in particular the section Using remembered locations as a strategy for setting a default preference value.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top