我发现很难弄清楚 MEAN.IO 堆栈如何定义在整个模块和/或包中使用的 default.html 模板。我正在尝试将一种视图更改为使用 default.html 模板,以使用我定义的一种。
他们的文档http://mean.io/#!/docs说他们使用 'swig' 作为他们的模板系统。但是,我进行了文件搜索,在模板中,我发现 5 次出现“swig”,它只在 html 中声明为文本。我没有看到在哪里使用 swig,也没有在后端注入。它应该在后端。有任何想法吗?.
默认是我所有其他页面用作其父级的 html 模板。我想将该 html 更改为另一个。这是 default.html 的样子:
<!doctype html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="https://www.facebook.com/2008/fbml" itemscope="itemscope" itemtype="http://schema.org/Product">
{% include '../includes/head.html' %}
<body>
<div class="navbar navbar-default navbar-fixed-top" data-ng-include="'/system/views/header.html'" data-role="navigation"></div>
{% if adminEnabled %}
<section class="admin-menu">
<div data-ng-include="'/mean-admin/views/index.html'"></div>
</section>
{% endif %}
<section class="content">
<section class="container">
{% block content %}{% endblock %}
</section>
</section>
{% include '../includes/foot.html' %}
</body>
</html>