Let's say I have a DataSource of products. By default, we display the products in a list form, and that template is called "list-template".
What if we want to allow the user to see the same products but in grid form (e.g. "grid-template")? Can we change the data-template after the fact to do this?
<
tbody
data-template
=
"list-template"
data-bind
=
"source: products"
></
tbody
>
What if we want to allow the user to see the same products but in grid form (e.g. "grid-template")? Can we change the data-template after the fact to do this?