How to load html (template) from a file?

47 views
Skip to first unread message

John

unread,
Dec 8, 2009, 3:39:53 PM12/8/09
to PURE - JavaScript Templates Engine
hi there,

I am very interested in using PURE but i would like to render (using
jquery) to a Id from a pre-saved html template. I was looking at the
examples and i see a lot that render via code ...

is it not possible to load the HTML that i wish to render from a
file ?

Any ideas really appreciated

Thanks

Mic Cvilic

unread,
Dec 8, 2009, 5:02:48 PM12/8/09
to pure-unobtrusive...@googlegroups.com
Here is the technique I use to load dynamically templates in our web app.
The objective was to make it cross lib, but there is still some
generalisation work to make it officiallly a plugin of PURE ;)
Any suggestion or idea in this area would be great!

The $p.plugin.getTemplate code and an example:
http://gist.github.com/252018

Here is the remote template called 'template.html' in the example above:
http://gist.github.com/252020

I guess you can fetch as well your HTML page by jquery-ajax, then render
it, but this would be jquery world's.
> --
>
> 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.
>
>
>

Reply all
Reply to author
Forward
0 new messages