PURE, the JavaScript template engine, has had a major new release which includes:
- Auto-rendering: a new PURE method takes your HTML and your JSON data and merges them automatically. The class attribute is used to map the HTML and the data. (Read more about autoRender and its jQuery version on our Wiki).
- Functions as directive are called by reference and not serialized
- Attach events to your HTML (Read more)
- Change the id of the template root node (as any other attribute)
- Better string value handling
- Use of named properties in iteration “obj.prop” as well as “obj['name']“
For a feel of the library check out the documentation which takes you from the simplest render:
$('#hello').autoRender({ "who": "John Doe" });}
No comments:
Post a Comment