ejs template call nodejs function
2014-10-10 14:49
260 查看
要在ejs模版中掉node函数,要加到app.locals里面,
app.js: app.locals.myFunc = function(arg){...} index.ejs: <%= myFunc(objectState.data[0]) %>
相关文章推荐
- nodejs express template (模版)的使用 (ejs + express)
- nodejs express template (模版)的使用 (ejs + express)
- rapidxml 在mac下的编译error: call to function 'print_pi_node' that is neither visible in the template def
- nodejs express template (模版)的使用 (ejs + express)
- nodejs express template (模版)的使用 (ejs + express)
- nodejs + edge + ejs + c#
- NodeJs:用 nodejs + edge + ejs + c#,打造属于自己的代码生成器
- [转载]node.js之 express框架+ejs模板 windows下建站点
- windows环境下安装与运行 NodeJS + express + ejs
- XSLT(6) Function named templates and <xsl:call-template>
- 使用 Node.js 做 Function Test实现方法
- js Function.call
- NodeJs:用 nodejs + edge + ejs + c#,打造属于自己的代码生成器(下篇)
- nodejs template
- nodejs + express + ejs + mongodb 一个非常简单的前后端开发的实例2
- nodejs + express + ejs + mongodb 一个非常简单的前后端开发的实例3
- Node.js 有关模版引擎ejs和jade的结合(非express)
- js Function.call
- nowjs for Node - Directly call remote functions in Javascript
- Non JS Function call.