Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用angularjs时如何在html页面上设置页眉和页脚?它们是一种让 Angular 知道这些是页眉和页脚并将它们定位在页面顶部和底部的方法吗?
在主布局 (index.html) 中定义页眉和页脚 html 或使用 ng-include 包含它:
<div ng-include="'header.html'"></div> <div ng-view></div> <div ng-include="'footer.html'"></div>
定位由 CSS 决定。