2016-11-23 95 views
0

我想在android屏幕下的ios下導航欄下爲我的屏幕頂部製作一個固定的搜索欄。搜索欄不顯示在Ionic上

我使用的文檔: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

正如你可以看到沒有出現搜索欄...

我試圖把它在我的意見中的其他組件之間,但它不會出現e ither。文檔沒有解釋關於此主題的任何內容。非常令人沮喪

回答

0

http://plnkr.co/edit/dPsGZjczRSNpqmMDqLZQ?p=info

這是你提供的,如果您刪除的所有plunker標籤<br/>你會看到搜索欄是標題後面猛的代碼。

enter image description here

所以加入style="z-index:999999999999"(只是要確定)的<ion-searchbar>導致此plunker:

http://plnkr.co/edit/JE1Vm47ehXsmkp5s9PGZ?p=info

enter image description here

+0

難道是這個簡單,我可能不得不它想通了,但它不是這...不幸的是 –

+0

@HelderJulesDeBaere然後發佈更多的代碼請,這是你的代碼的解決方案發布。 – Ivaro18

相關問題