Constructor
new State(modulesnon-null)
Create the State instance
Parameters:
Name | Type | Description |
---|---|---|
modules |
Modules | The Micrio Modules controller |
Classes
Methods
(async) load(_json, immediateopt, isChildopt) → (non-null) {Promise}
Loads JSON blob of state
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
_json |
string | Array | The JSON string or Object | ||
immediate |
boolean |
<optional> |
false
|
Don't do any transitions or animations |
isChild |
boolean |
<optional> |
false
|
This is a sub-load operation |
Returns:
When all loading is done
- Type
- Promise
save(asStringopt) → {string|Array}
Returns JSON blob with all info
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
asString |
boolean |
<optional> |
false
|
Return a JSON String, not an Array |
Returns:
The current Micrio state
- Type
- string | Array