我正在尝试根据当前视图更改页眉。标头在 ngView 之外。这是可能的还是我需要将标题放在视图中?
我的代码与此类似:
<div id="header">
<div ng-switch on="pagename">
<div ng-switch-when="home">Welcome!</div>
<div ng-switch-when="product-list">Our products</div>
<div ng-switch-when="contact">Contact us</div>
</div>
(a lot of unrelated code goes here)
</div>
<div id="content>
<div ng-view></div>
</div>