- 授权协议: 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'} );
JavaScript: The Definitive Guide, 5th Edition
David Flanagan / O'Reilly Media / 2006-08-01 / USD 49.99
This Fifth Edition is completely revised and expanded to cover JavaScript as it is used in today's Web 2.0 applications. This book is both an example-driven programmer's guide and a keep-on-your-desk ......一起来看看 《JavaScript: The Definitive Guide, 5th Edition》 这本书的介绍吧!
