pokap/notpl
Composer 安装命令:
composer require pokap/notpl
包简介
Fast template engine without template
README 文档
README
Fast template engine without template
## Quick start
Clone the repo: git clone git://github.com/pokap/notpl.git.
Usage
In your html file :
<div id="container"></div>
// ------------- // controller var $tbody = function (tbody) { $([["Mark", "Otto"], ["Jacob", "Thornton"]]).each(function (index, value) { tbody.noTpl([['tr', [ ['td', (index + 1)], ['td', value[0]], ['td', value[1]] ]]]); }); }; // ------------- // template $(function(){ var container = $("#container"); container.html(""); container.noTpl([ ['table', [ ['thead', [ ['tr', [ ['th', '#'], ['th', 'First Name'], ['th', 'Last Name'] ] ]]], ['tbody', $tbody] ], {"class": 'table table-striped'}], ['form', [ ['fieldset', [ ['input', null, {"type": 'text', "placeholder": 'Type something…'}], ['button', 'Submit', {"type": 'submit', "class": 'btn'}] ]] ], {"method": 'POST', "action": '#', 'class': 'form-inline'}] ]); });
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-01-05