Namespace: KnockoutTemplateUtils

Oracle® JavaScript Extension Toolkit (JET)
7.1.0

F18183-01

QuickNav


PREVIEW: This is a preview API. Preview APIs are production quality, but can be changed on a major version without a deprecation path.

KnockoutTemplateUtils

Version:
  • 7.1.0
Since:
  • 4.0.0
Module:
  • ojknockouttemplateutils

Module usage

See JET Module Loading for an overview of module usage within JET.

Javascript Import Format
define(['ojs/ojknockouttemplateutils'], function(KnockoutTemplateUtils) {
 // Application should call API on KnockoutTemplateUtils 
})
Typescript Import Format
//This namespace exports multiple static methods or members. To import 
import * as KnockoutTemplateUtils from "ojknockouttemplateutils";

//Now you can access the methods as KnockoutTemplateUtils.methodName and so on

JET In Typescript

A detailed description of working with JET elements and classes in your typescript project can be found at: JET Typescript Usage.

Utility methods for knockout templates.

Methods

(static) getRenderer(template, bReplaceNode) → {function(Object)}

JET custom elements do not support template binding attributes, so applications using knockout templates should use this utility to convert their knockout templates to a renderer function for use in component renderer APIs instead.
Parameters:
Name Type Argument Description
template string The name of the knockout template to use.
bReplaceNode boolean <optional>
True if the entire target node should be replaced by the output of the template. If false or omitted, the children of the target node will be replaced.
Returns:
A renderer function that takes a context object.
Type
function(Object)