|
- /**
- * 渲染模板(根据模板名)
- * @name template.render
- * @param {String} 模板名
- * @param {Object} 数据
- * @return {String} 渲染好的字符串
- */
- var renderFile = template.renderFile = function (filename, data) {
- var fn = template.get(filename) || showDebugInfo({
- filename: filename,
- name: 'Render Error',
- message: 'Template not found'
- });
- return data ? fn(data) : fn;
- };
-
|