In the Custom Attribute documentation, it's mentioned that you can pass options to @bindable
in the ES6 class decorators, like so:
@bindable({
name:'myProperty', //name of the property on the class
attribute:'my-property', //name of the attribute in HTML
changeHandler:'myPropertyChanged', //name of the method to invoke when the property changes
defaultBindingMode: bindingMode.oneWay, //default binding mode used with the .bind command
defaultValue: undefined //default value of the property, if not bound or set in HTML
})
@bindable({ attribute:'my-property', changeHandler:'myPropertyChanged', defaultBindingMode: bindingMode.oneWay, defaultValue: undefined }) name;
It might be worthwhile to add an explicit example of this.