- 授权协议: GPL
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: https://github.com/ecomfe/etpl
软件介绍
ETPL是一个灵活、具有强大复用能力的高性能的模板引擎,适用于WEB前端应用中视图的生成,特别是SPA(Single Page APP)类型的应用。
ETPL可以在CommonJS/AMD的模块定义环境中使用,也可以直接在页面下通过<script src=的方式引用。CommonJS/AMD环境下需要通过如下代码得到ETPL的模块。
var etpl = require( 'etpl' );
得到ETPL模块对象后,首先对模板源代码进行编译,就能够得到模板编译后的function。
var render = etpl.compile( 'Hello ${name}!' );
然后执行这个function,传入数据对象,就能得到模板执行的结果了。
var text = render( {name: 'etpl'} );
BSD Hacks
Dru Lavigne / O'Reilly Media, Inc. / 2004-05-24 / USD 24.95
If you want more than your average BSD user--you want to explore and experiment, unearth shortcuts, create useful tools, and come up with fun things to try on your own--BSD Hacks is a must-have. This ......一起来看看 《BSD Hacks》 这本书的介绍吧!
