【问题标题】:Ionic Navigation - Don't update navbar离子导航 - 不要更新导航栏
【发布时间】:2016-11-03 18:00:32
【问题描述】:

大家好,我在 Ionic 中创建了一个导航概念:

<ion-nav-bar class="bar-positive">
    <ion-nav-back-button class="button-clear">
        <i class="ion-arrow-left-c"></i> Back
    </ion-nav-back-button>
</ion-nav-bar>

<ion-nav-view></ion-nav-view>

<script id="list.html" type="text/ng-template">
    <ion-view view-title="First page">
        <ion-content class="padding">


            <a  nav-direction="back" nav-transition="android" href="#/movie/1">
                <button class="button button-positive">
                    Tabellen
                </button>
            </a><br/><br/>

            <a nav-direction="forward" nav-transition="android" href="#/movie/1">
                <button class="button button-positive">
                    Live-Ticker
                </button>
            </a><br/><br/>

            <button class="button button-positive" ng-click="changePage()">
            Funktion
            </button>
        </ion-content>
    </ion-view>
</script>

<script id="view.html" type="text/ng-template">
    <ion-view view-title="Second page">
        <ion-content class="padding">
            <a class="button icon ion-home" href="#/tab/home"> Home</a>
        </ion-content>
    </ion-view>
</script>

http://plnkr.co/edit/h9KwSJVt5n4bEnTXkBJ2?p=preview

问题是我想使用自己的导航栏。以我的风格,文本按钮...... 另外我不希望导航栏更新。当我现在切换页面时,导航栏会显示一个后退按钮并更改标题。我想保持不变......

【问题讨论】:

    标签: javascript html css angularjs ionic-framework


    【解决方案1】:

    http://plnkr.co/edit/OxdP5xj3400fJmAODQxy?p=preview

    只需删除ion-nav-back-button

    并在ion-viewview-title属性中设置所需的标题


    更新 -

    这就是你想要的 -

    http://plnkr.co/edit/dU0u6cwUQxah5E0UCvHX?p=preview

    在这里,我删除了 ion-nav-bar 并使用了自定义栏 div。 另外,您需要手动将 has-header 类设置为 ion-content 才能获得顶部填充。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-07
      • 1970-01-01
      • 1970-01-01
      • 2019-01-06
      相关资源
      最近更新 更多