public
Description: PURE Unobtrusive Rendering Engine for HTML
Home | Edit | New

pure.autoRender method

This is the automatic rendering method of PURE.

pure.autoRender( html, context [, directives] )

Parameters:





html


This is the HTML template we want to transform with the data


context


This is the JSON data we want to render on


directives


In addition to the automatic mapping between HTML classes and JSON properties, you can set additional directives.
This is the commands to tell PURE how to link the JSON data and the HTML.
See more information about directive at What is a directive ?

Output:


string

This method returns a string with the HTML transformed. It can then be inserted in the innerHTML of an element.


 


See an example here…

Last edited by squadette, Sun Oct 04 13:35:17 -0700 2009
Home | Edit | New
Versions: