[]
        
(Showing Draft Content)

Binding Class

Binding Class

Provides binding to complex properties (e.g. 'customer.address.city')

Heirarchy

Constructors

Properties

Methods

Constructors

constructor

  • new Binding(path: string): Binding
  • Initializes a new instance of the Binding class.

    Parameters

    • path: string

      Name of the property to bind to.

    Returns Binding

Properties

path

path: string

Gets or sets the path for the binding.

In the simplest case, the path is the name of the property of the source object to use for the binding (e.g. 'street').

Sub-properties of a property can be specified by a syntax similar to that used in JavaScript (e.g. 'address.street').

Methods

getValue

  • getValue(object: any): any
  • Gets the binding value for a given object.

    If the object does not contain the property specified by the binding path, the method returns null.

    Parameters

    • object: any

      The object that contains the data to be retrieved.

    Returns any

setValue

  • setValue(object: any, value: any): boolean
  • Sets the binding value on a given object.

    If the object does not contain the property specified by the binding path, the value is not set.

    Parameters

    • object: any

      The object that contains the data to be set.

    • value: any

      Data value to set.

    Returns boolean

    True if the value was assigned correctly, false otherwise.