📜  ejs是什么意思? - Javascript代码示例

📅  最后修改于: 2022-03-11 15:01:26.308000             🧑  作者: Mango

代码示例2
let str = "Hello <%= include('file', {person: 'John'}); %>",
      fn = ejs.compile(str, {client: true});

fn(data, null, function(path, d){ // include callback
  // path -> 'file'
  // d -> {person: 'John'}
  // Put your code here
  // Return the contents of file as a string
}); // returns rendered string