synapse
synapse copied to clipboard
Add support for interfacing with a template or DOM fragment
Currently only one binding can be setup at a time, but it would be very useful to something like:
template = '<div class="book">
<h1 role="title"></h1>
<em role="author"></em>
<p role="summary"></p>
</div>'
fragment = $(template)
model = new Backbone.Model
title: 'Secrets of a JavaScript Ninja'
author: 'John Resig'
summary: 'Learn to be a true JavaScript ninja like John..'
fragment.observe model
This would be a great next step. If it could stay de-coupled from the template engine and allow somehow for both DOM (Angular/rivets-style) and string templates (Handlebars, Underscore, etc), it would be truly amazing.