flatiron/plates — Issue #7: Readme Needs updating
Author: mwawrusch
Created: 2011-11-13 07:03:00+00:00
State: open

Would love to do it myself, but I am way to short on time the next couple of days.

Basically, it is Plates now, not Plate and you need to invoke it either

tmpl = new Plates("\<......")

or

tmpl = new Plates ("\<......", { "name" : "Frank" } )

or

tmpl = new Plates ("\<......", { "name2" : "Frank" }, {"name2" : "name"} ) // mapping might be the other way around

and you can set data and html explicitly as well with data(...), html(..)

to get the result you simply call tmpl.bind()

To use it with jquery and embedded in html (for example to preprocess the html with haml, jade do something like this):

%script{:id=>'customers_template', :type=>'text/x-plates-tmpl'}
%ul{:'data-bind'=>'customers'}

and load the template with $('#customers_template').text()