JS-Templator
Generates matched view-only and editable templates for JavaScript objects.
ROADMAP
- Using Polymer and handlebars
- Type-based dispatch
- Auto-wiring changes
- Using normal HTML elements and es6 template strings
Example
let templ = Templator.wrap({ foo: true, bar: 3, baz: new Date()}); templ.getTemplate(); // returns null, we haven't told it to watch any properties yettempl.watch('foo', 'My Property');
Now calling .getTemplate()
will return a document fragment containing the following:
My Property {{foo}} False True