Docs (4.0.0)
class Binding method

bindTo

Applies this binding to the specified target object.

bindTo<TObject extends ManagedObject>(target: TObject, propertyOrFunction: keyof TObject | ((value?: T, bound?: boolean, forced?: boolean) => void)): void

Notes

  • This method should only be used once for each target, preferably from a constructor, since each call adds a new property observer.
  • The same binding can be applied multiple times (e.g. to different instances of an activity), removing the need to create a new Binding instance each time.

Parameters

  • target — The target (attached) object
  • propertyOrFunction — The property to update, or a custom function to handle value updates

Related