Skip to main content

onPushUpdateAfter

onPushUpdateAfter

Called right after real-time (subscription) data has been applied to the Data Set.

Parameters

  • contentsDSName (string): The name of the Data Set that was updated
  • provInstName (string): The name of the subscribed Provider Instance

Returns: No return value — this is a callback, so its return value isn't used.

Description

The push data has finished landing, so this is the point where you can read the latest value.

Example

function onPushUpdateAfter(contentsDSName, provInstName) {
var price = $vm.getDSValue(contentsDSName + ".price");
$log.i("live price: " + price);
}

Related

  • It pairs with onPushUpdateBefore; the Before/After difference is whether the value has reached the widgets yet.
  • A real-time stream can fire this very frequently, so heavy computation inside this function can hurt performance.