【发布时间】:2019-12-28 01:29:14
【问题描述】:
我在根页面中的标题(工具栏)位置存在以下问题:
为什么标题根页面位于选项卡上方?我需要把它们放在孩子的页面中。
代码很简单:
tabs.html
<ion-tabs tabsPlacement="top" tabsLayout="icon-bottom" tabsHighlight=true>
<ion-tab [root]="tab1Root" tabTitle="Home" tabIcon="home"></ion-tab>
<ion-tab [root]="tab2Root" tabTitle="About" tabIcon="information-circle">
</ion-tab>
<ion-tab [root]="tab3Root" tabTitle="Contact" tabIcon="contacts"></ion-tab>
</ion-tabs>
tab1Root (home.html)
<ion-header>
<ion-toolbar>
<div >
<small>
this is the toolbar ...
</small>
</div>
<ion-buttons end>
<button ion-button icon-only>
<ion-icon name="more"></ion-icon>
</button>
</ion-buttons>
</ion-toolbar>
</ion-header>
<ion-content padding>
<h2>Welcome to Ionic!</h2>
<p>
This starter project comes with simple tabs-based layout for apps
that are going to primarily use a Tabbed UI.
</p>
<p>
Take a look at the <code>src/pages/</code> directory to add or change tabs,
update any existing page or create new pages.
</p>
</ion-content>
谢谢。
【问题讨论】:
标签: ionic-framework ionic2 ionic3