Last time I posted a code snippet with description of data driven Knockout views. I have modified and simplified it and
- added support for
forEach
binding and - the
type
member ofViewModel
class can return a function that is evaluated for every item in collection
This brings even more flexibility, the view model itself can decide which view to use based on a value returned from type
function.
The example will follow soon.