在我的网站上,我在每个页面上显示相同的页眉,我想知道是否有AngularJS/jQuery或简单的JS解决方案只加载正文的内容而不是页眉页面更改。仅加载页面更改
<html ng-app="headerApp" ng-controller="HeaderCtrl">
<head>
<!-- here I load my JS and css ... -->
<div ng-include="'templates/Header.tpl.html'"></div>
</head>
<body>
<div ng-include="'templates/IndexBody.tpl.html'"></div>
</body>
<footer><div ng-include="'templates/Footer.tpl.html'"></div> </footer>
</html>
所以我的HTML看起来像这样我有每个部分单独的模板。但现在我为每个页面创建一个html文件。所以我认为有一种方法可以在体内改变ng-include。
感谢您的帮助!