Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a single binding expression.

Hierarchy

  • BindingExpression

Index

Properties

attributeName

attributeName: string

The name of the attribute this binding applies to, if applicable.

boundViews

boundViews: ViewBase[]

Views created as a result of this binding.

domElement

domElement: HTMLElement

The DOM element this binding expression applies to.

invert

invert: boolean

Whether or not this binding should be inverted, if applicable.

parentView

parentView: ViewBase

The view that this binding belongs to.

target

target: string

The target name of this binding, e.g. the name of a view model field.

targetBindings

targetBindings: object[]

Array of objects containing event subscriptions tokens for bindings to Observable and ObservableCollection objects.

templateKey

templateKey: string

The key field use in template selection.

templateMode

templateMode: string

Describes the templating mode of this binding expression.

templateSelections

templateSelections: object

Templates available for binding.

Type declaration

  • [key: string]: HTMLElement

type

type: string

The name of this binding type. One of: -attr -visibility -event -collection

viewModel

viewModel: any

The view model this binding connects to.

Methods

destroy

  • destroy(): void
  • Destroys this binding expression along with any views created as a result of it.

    Returns void

on

  • on(event: string, handler: function): void
  • Connect a BindingExpression event from the DOM element. The event will automatically be disconnected when this BindingExpression is destroyed.

    Parameters

    • event: string
    • handler: function
        • (event: Event): any
        • Parameters

          • event: Event

          Returns any

    Returns void