Home Manual Reference Source Test
import Template from 'web-cell/source/view/Template.js'
public class | source

Template

String template

Decorators:

Test:

Static Member Summary

Static Public Members
public static get
public static get

Constructor Summary

Public Constructor
public

constructor(raw: string, varName: stirng[], onChange: ChangedCallback, bindData: Array)

Member Summary

Public Members
public
public

data: *

public
public
public

raw: *

public

Reference map of contexts

public

value: *

Last evaluated value

public

varName: *

Method Summary

Public Methods
public
public

evaluate(context: object, parameter: ...*): *

Evaluate expression

public

push(): *

public

toString(): *

Static Public Members

public static get Expression: RegExp source

public static get Reference: RegExp source

Public Constructors

public constructor(raw: string, varName: stirng[], onChange: ChangedCallback, bindData: Array) source

Params:

NameTypeAttributeDescription
raw string
varName stirng[]
  • optional

Name list of the Local variable

onChange ChangedCallback
  • optional

Call with New & Old value

bindData Array
  • optional

The parameter bound to onChange

Public Members

public [.length++]: * source

public data: * source

public length: number source

public onChange: * source

Test:

public raw: * source

public reference: Map source

Reference map of contexts

public value: * source

Last evaluated value

public varName: * source

Public Methods

public clear(): string source

Return:

string

Value evaluated with empty data

Test:

public evaluate(context: object, parameter: ...*): * source

Evaluate expression

Params:

NameTypeAttributeDescription
context object
  • nullable: true

Value of this in the expression

parameter ...*
  • optional

One or more value of the Local variable

Return:

*

Test:

public push(): * source

Return:

*

public toString(): * source

Return:

*