【发布时间】:2016-03-18 02:26:42
【问题描述】:
目前习惯使用 Express、Angularjs 和 Nodejs。是否可以使用这些框架来创建可重用或模板头标签部分以在多个 html 文件中使用。
例如,head.html 包含
<head>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
</head>
并且文件file1.html 和file2.html 想要包含来自head.html 的相同头部。是否可以使用这些框架来实现这一目标?是否有任何替代/更好的解决方案?
【问题讨论】:
标签: html templates reusability