Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/sql-server-2008/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 是否可以在具有单独上下文的模板中包含模板?_Node.js_Templates_Handlebars.js - Fatal编程技术网

Node.js 是否可以在具有单独上下文的模板中包含模板?

Node.js 是否可以在具有单独上下文的模板中包含模板?,node.js,templates,handlebars.js,Node.js,Templates,Handlebars.js,我正在开发nodejs和handlebar中的应用程序 我希望能够创建一个布局模板,然后在该布局中添加各种单独的组件 每个组件将使用单独的把手模板和上下文创建。 e、 g.layout.tmpl <html> <head>...</head> <body> <!-- somehow render a handlebars template here with a separate context --> <!-- som

我正在开发nodejs和handlebar中的应用程序

我希望能够创建一个布局模板,然后在该布局中添加各种单独的组件

每个组件将使用单独的把手模板和上下文创建。 e、 g.layout.tmpl

<html>
<head>...</head>
<body>
  <!-- somehow render a handlebars template here with a separate context -->

  <!-- somehow render another handlebars template here with a separate context -->
<body>
</html>

...

这可能吗?如果没有,是否有其他模板引擎可以执行此操作?

是。这是可能的把手