Angular2将布局文件拆分为页眉和页脚

时间:2017-11-23 05:18:04

标签: angular typescript angular2-template

我正在尝试在https://stackblitz.com/edit/angular-multi-layout-example?file=app%2F_layout%2Fsite-layout%2Fsite-layout.component.html中描述的Angular2中执行多布局示例。在我的示例中,我使用了Admin LTE模板。问题是,当我将布局拆分为页眉和页脚时,它将在头文件中打开div标签,并在页脚文件中关闭它。因此,当我运行应用程序时,它会显示错误

Error: Template parse errors:
Unexpected closing tag "div". It may happen when the tag has already been closed by another tag.

此处网站布局组件的模板为

<site-header></site-header>
<router-outlet></router-outlet>
<site-footer></site-footer>

我们如何将文件拆分为页眉和页脚?请帮忙。

0 个答案:

没有答案