1 Star 0 Fork 0

UFQI/GTAjax

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
javascript-based-template-engine.201811.txt 800 Bytes
一键复制 编辑 原始数据 按行查看 历史
Wadelau 提交于 2018-11-29 17:39 +08:00 . prgs with JSTpl.
javascript-based template engine:
1) runtime in client-side, reduce computing render in server-side;
2) language-independent, not-bound with backend scripts/languages;
3) totally-isolated between MVC, data transfer with JSON;
4) full-support with built-in logic and customerized functions, express powerfully;
JavaScript规范中,变量命名只允许 a-zA-Z 和 _, $ 开头;
http://krasimirtsonev.com/blog/article/Javascript-template-engine-in-just-20-line
https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript
steps:
0. html tpl file (xxx.html) with javascripts enclosed with tags {} (changeable?);
1. reverse all html into strings;
2. parse all javascripts;
3. read json serialized data from an html element;
4. merge with javascripts and output;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/xenxin/GTAjax.git
git@gitee.com:xenxin/GTAjax.git
xenxin
GTAjax
GTAjax
master

搜索帮助