In WPF there is a binding that I use a lot;
<GridViewColumn DisplayMemberBinding="{Binding Path=Price, StringFormat=Now {0:c}!}"/>
Is there a good way to achieve a similar binding in knockout? I'm using a sprintf library which would be great to utilize.
I guess I can create a custom binding for this, but this should be a rather common request so I thought I'd check here before trying to re-invent the wheel.
One use case is to build a href
attribute of an a
tag dynamically, e.g. to produce something like this:
<a href="#products/1/product/2">Foo</a>
Where 1 is the product group and 2 is the id of a product