Transparency is a semantic template engine for the browser. It maps JSON objects to DOM elements by id, class and data-bind attributes.
969
stars
112
forks
source link
Associate data object with element (when rendering lists) #17
Closed
raimohanska closed 12 years ago
When rendering a list, I want to assign event handlers to the list item, and use the model object (list item) in those handlers.
I suggest associating the list item with the corresponding element.
Could we do that by setting a
transparency.model
property in the list element?I took the first pass at this in my fork at https://github.com/raimohanska/transparency (commit 629611ab8069c6c94d198609614027ede464c32c)
This would work at least in my application code (sample below):