# engine7 **Repository Path**: jindlab/engine7 ## Basic Information - **Project Name**: engine7 - **Description**: 做APP的利器。可嵌套的JS模版引擎,支持JSON API 渲染,支持AJAX form 提交 - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: master - **Homepage**: https://github.com/jindong5210/engine7 - **GVP Project**: No ## Statistics - **Stars**: 15 - **Forks**: 5 - **Created**: 2017-03-26 - **Last Updated**: 2020-12-18 ## Categories & Tags **Categories**: template-engine **Tags**: None ## README Engine7 ========= 基于Template7构建,语法类似Handlebars的JavaScript模版引擎. * 用JSON API来渲然模板. * 模版支持嵌套. * 封装AJAX表单提交. * 表单的数据可转换为可嵌套JSON格式. * 对Template7进行了扩展. JavaScript template engine based on Template7 with syntax similar to Handlebars. * Render a template with JSON API. * Nested template supported. * AJAX form submit supported. * Form data could convert to nested JSON. * Template7 helper extension. ## Getting Started * Required [jQuery](http://jquery.com/) and [Template7](http://www.idangero.us/template7/) * Installation ``` ... ``` * Define templates ``` ``` ``` ``` * Define JSON APIs ``` { "id" : 1, "name" : "Jeffrey", "age" : 33, "address" : "Dalian Software Park, China", "mail" : "jindong05@126.com" } ``` ``` [ { "id" : 1, "name" : "javascript" }, { "id" : 2, "name" : "java" } ] ``` * Render in html ```
``` ## Reference ### Attributes * #### data-tpl-id Define a template. Always be used on a script tag. ```