首页 文章

搜索栏没有在Ionic上显示

提问于
浏览
0

我正在尝试在我的屏幕顶部的android屏幕下方和ios的导航栏下面创建一个固定的搜索栏 .

我正在使用文档:http://ionicframework.com/docs/v2/api/components/searchbar/Searchbar/

离子版:2.1.12

但我的搜索栏没有显示 .

我的代码:

HTML:

<ion-view title="Search" id="page3" hide-nav-bar="isAndroid">
    <div class="bar bar-subheader bar-positive item-input-inset" no-tap-scroll="true">
        <ion-searchbar
            [(ngModel)]="search"
            [showCancelButton]="shouldShowCancel"
            (ionInput)="handleSearch($event)">
        </ion-searchbar>
    </div>
    <ion-content has-header="true" padding="true">
        <ion-list>
            <ion-item ng-repeat="doc in documents" item="doc">
            </ion-item>
        </ion-list>
    </ion-content>
</ion-view>

截图:

Screenshot

如你所见,没有搜索栏出现......

我尝试将它放在我的视图中的其他组件之间,但它也没有出现 . 文档没有解释这个问题 . 很沮丧

1 回答

相关问题