开发者

Does this exist: HTML Template Renderer Written in JavaScript?

开发者 https://www.devze.com 2023-01-25 22:17 出处:网络
What of instead of the standard Django template rendering model which is server side, there were a library that allowed something that looked 开发者_C百科like a Django template to be rendered with Jav

What of instead of the standard Django template rendering model which is server side, there were a library that allowed something that looked 开发者_C百科like a Django template to be rendered with JavaScript in the client's browser? The variables could be filled in by getting a JSON blob from the server and rendering the template would be done entirely on the client side.

Does a library like this already exist?

As I understand it, GWT sort of does this, but behind the scenes and with a ton of programmer overhead.


I think you may be thinking of the recently announced jQuery template plugins. There are of course other solutions out there, this has gotten the most press lately, with a similar syntax to what you describe.


Google Closure has a template library, there is TrimPath, and there is a long list of answers over here.


you probably think of mustache, but you can also check pure templates

0

精彩评论

暂无评论...
验证码 换一张
取 消