DomTemplate
DomTemplate copied to clipboard
Binding nested object properties
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">