On 07/12/09 21:45, manalang wrote:
> I noticed that the examples for Pure2 (
http://beebole.com/pure/
> version2/) show that autoRender is fed with a directive. Is this
> required? I did a swap of Pure with Pure2 in my app where I do a very
> simple iteration through a list using autoRender... and now it no
> longer works. I get an openloop.a is undefined error. Here's my code
> ->
http://gist.github.com/251092
>
Autorender does not need directive, but can have some if necessary.
A node you want to repeat needs a parent now.
You have to start your template a node over the LI.
$('ol').autoRender(bindData);
> Also, for the Pure2 examples (
http://beebole.com/pure/version2/) when
> viewing the source, it would be great if you can show the actual JS
> that you used to execute the example... currently, it shows the HTML,
> the data json, and directive json... but it's not clear whether you
> used the autoRender or compile/render methods to generate the output.
>
The example page is a way to quickly add and see different usages and
check the cross lib functions.
I'm adding one by one those examples in their full version (only with
jquery) in the directory /tutorial in the zip file you can get at
http://github.com/pure/pure/zipball/master
I agree it is not the easiest but you can see at the bottom of the file
js/index.js which example use render(default) or autoRender(ex 1, 2, 3,
4, 6)
> Thanks!
>
> Rich
>
> --
>
> You received this message because you are subscribed to the Google Groups "PURE - JavaScript Templates Engine" group.
> To post to this group, send email to
Pure-Unobtrusive...@googlegroups.com.
> To unsubscribe from this group, send email to
Pure-Unobtrusive-Rende...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/Pure-Unobtrusive-Rendering-Engine?hl=en.
>
>
>