bound
Creates a new property binding.
bound<S>(source: Binding.ValidPathString<S>, defaultValue?: any): Binding<any>
Notes
- This function creates a
<a href="Binding.html">Binding</a><any>
instance. Use bound.number(), bound.string(), bound.boolean(), bound.not(), and bound.list() to create typed bindings. - The bound.strf() function can be used to create a StringFormatBinding instance.
Parameters
- source — The source property name or path
- defaultValue — An optional default value, that’s used instead of the bound value when undefined
Return value
A new Binding instance.
Static Members
- function number(source, defaultValue?) staticCreates a new property binding, for a number value.
- function string(source, defaultValue?) staticCreates a new property binding, for a string value.
- function boolean(source, defaultValue?) staticCreates a new property binding, for a boolean value.
- function not(source, defaultValue?) staticCreates a new property binding, negating the bound value using the
!
operator. - function list(source) staticCreates a new property binding, for an iterable value (array, Map, ManagedList, and others).
- function strf(format, …bindings) staticCreates a new string-formatted binding, with nested property bindings.
Related
- class BindingA class that represents a property binding.