DomTemplate icon indicating copy to clipboard operation
DomTemplate copied to clipboard

Binding nested object properties

Open g105b opened this issue 3 years ago • 0 comments

Consider this class:

class Product {
	public function __construct(
		public readonly string $name,
		public readonly Price $price,
	) {}
}

Binding the name property as usual: <p data-bind:text="name">

But price is not a string. It would be nice to be able to do something like this: <p data-bind-text="price.getDecimal">

g105b avatar Jul 12 '22 12:07 g105b