Class: KnockoutUtils

Oracle® JavaScript Extension Toolkit (JET)
3.2.0

E87541-01

QuickNav

oj. KnockoutUtils

Version:
  • 3.2.0
Utility methods for blending Knockout observables with the data model

Constructor

new KnockoutUtils()

Source:

Methods

<static> map(m, callback, array) → {Object|undefined}

Turns the attributes in a model object (or the attributes of all models in a collection object) into Knockout observables for use with components' view models.
Parameters:
Name Type Argument Description
m Object The model or collection containing the attributes to be converted to Knockout observables.
callback function(Object) <optional>
Called once per model so that a caller can add their own Knockout computed observables to the model.
array boolean <optional>
Should function return an observable array if m is an oj.Collection, vs. an array of observables?
Source:
Returns:
array of Knockout observables or an observable array
Type
Object | undefined