The synchronization is used for synced the time and user in FrameworkJS with CloadIO.
The app.onSynced
event is called when the time is synced with CloadIO. Here we can write the codes to get basic data from CloadIO.
Type:
Function
app.onSynced = function () {};
// on sync event
// called when time synced with cloadio
app.onSynced = function () {
ref.child('model').get(function (error, value) {
if (error)
console.error('get value from cloadio was failed', error);
else {
// define local app variable
if (!app.local.value)
app.local.value = {};
app.local.value = value;
}
});
};