zh Kooboo Logo Documents

State

 

State management for the current context, valid only for the current request.
 
Only providing get and set methods.
 
k.state.get(key: string): any
k.state.set(key: string, value: any): void
 
Example:
 
var obj = {name: "myname", fieldtwo: "value"}; 
k.state.set("key", obj);

// in ohter page
var value = k.state.get("key");
k.response.write(value);