离子导航按钮在抽象视图中不起作用
ionic ion-nav-buttons not working in abstract view
我试图使用离子框架创建一个包含导航按钮的抽象视图,但它似乎不起作用:
Index.html
<ion-nav-bar align-title="left" class="bar-stable"></ion-nav-bar>
<ion-nav-view></ion-nav-view>
摘要视图:
<script id="menu.html" type="text/ng-template">
<ion-view cache-view="false">
<ion-nav-buttons side="right">
<button class="button button-icon ion-more"></button>
</ion-nav-buttons>
<ion-nav-view></ion-nav-view>
</ion-view>
</script>
第 1 页:
<script id="page1.html" type="text/ng-template">
<ion-view cache-view="false" title="Page 1">
<ion-content>
<h1>This is page 1</h1>
<a ui-sref="page2">Go to page 2</a>
</ion-content>
</ion-view>
</script>
第 2 页:
<script id="page2.html" type="text/ng-template">
<ion-view cache-view="false" title="Page 2">
<ion-nav-buttons side="right">
<button class="button button-icon ion-more"></button>
</ion-nav-buttons>
<ion-content>
<h1>This is page 2</h1>
<a ui-sref="page1">Go to page 1</a>
</ion-content>
</ion-view>
</script>
全码笔:http://codepen.io/anon/pen/XJxoLb
页面 1 视图没有导航按钮,但页面 2 视图有,因为它直接在自己的视图中包含离子导航按钮。
如果我将 ionic 版本更改为 beta 13,它确实有效。
这是更高版本中的错误,还是我需要做一些不同的事情才能在最新版本(beta 14,rc 0)中工作?
我试图使用离子框架创建一个包含导航按钮的抽象视图,但它似乎不起作用:
Index.html
<ion-nav-bar align-title="left" class="bar-stable"></ion-nav-bar>
<ion-nav-view></ion-nav-view>
摘要视图:
<script id="menu.html" type="text/ng-template">
<ion-view cache-view="false">
<ion-nav-buttons side="right">
<button class="button button-icon ion-more"></button>
</ion-nav-buttons>
<ion-nav-view></ion-nav-view>
</ion-view>
</script>
第 1 页:
<script id="page1.html" type="text/ng-template">
<ion-view cache-view="false" title="Page 1">
<ion-content>
<h1>This is page 1</h1>
<a ui-sref="page2">Go to page 2</a>
</ion-content>
</ion-view>
</script>
第 2 页:
<script id="page2.html" type="text/ng-template">
<ion-view cache-view="false" title="Page 2">
<ion-nav-buttons side="right">
<button class="button button-icon ion-more"></button>
</ion-nav-buttons>
<ion-content>
<h1>This is page 2</h1>
<a ui-sref="page1">Go to page 1</a>
</ion-content>
</ion-view>
</script>
全码笔:http://codepen.io/anon/pen/XJxoLb
页面 1 视图没有导航按钮,但页面 2 视图有,因为它直接在自己的视图中包含离子导航按钮。
如果我将 ionic 版本更改为 beta 13,它确实有效。
这是更高版本中的错误,还是我需要做一些不同的事情才能在最新版本(beta 14,rc 0)中工作?