angularjs – 离子离子导航按钮不在抽象视图中工作

前端之家收集整理的这篇文章主要介绍了angularjs – 离子离子导航按钮不在抽象视图中工作前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
使用离子框架我试图有一个包含导航按钮的抽象视图,但它似乎不起作用:

的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页视图没有,因为它直接在其自己的视图中包含离子导航按钮.

如果我将离子版本更改为beta 13,它确实有效.

这是否是以后版本中的错误,或者我是否需要做一些不同的工作才能使用最新版本(beta 14,rc 0)?

解决方法

猜你在找的Angularjs相关文章