【发布时间】:2017-02-11 14:54:46
【问题描述】:
我正在努力将子标题添加到基于选项卡的 Ionic 应用程序中。问题是子标题在Android中不显示,但在iOS中显示。
我想为搜索栏使用副标题,这样它就不会被滚动到下面的内容中。
重现问题的步骤:
- 基于 tabs 项目创建测试应用:
ionic start subheader-test tabs
- 修改
.\subheader-test\www\templates\tab-dash.html以在“状态”选项卡上添加子标题,使其看起来像下面的文件:
<ion-view view-title="Dashboard">
<ion-header-bar class="bar-subheader bar-balanced">
<h1 class="title">Subheader</h1>
</ion-header-bar>
<ion-content class="padding">
<h2>Welcome to Ionic</h2>
<p>
....
</p>
</ion-content>
</ion-view>
- 启动 Ionic 实验室:
ionic serve -l
我用has-subheader 和has-header 分类的组合测试了ion-content,但无济于事。
在我测试过的任何浏览器(Chrome、Firefox、IE 11)的 Android 版本的应用程序中,子标题都不显示。
【问题讨论】:
标签: javascript ionic-framework