Nulra
June 1, 2018, 1:30pm
1
I have a page call “B” with a searchbar in the ion-navbar, when B page back to page A pressing the back button, searchbar will have a afterimage in the page A ion-navbar in 1 second and then disappear. Anyone know what is the problem, and how to solve?
<ion-header no-border>
<ion-navbar>
<ion-searchbar>
</ion-searchbar>
</ion-navbar>
</ion-header>
Try:
<ion-header no-border>
<ion-searchbar>
</ion-searchbar>
</ion-header>
Or:
<ion-header no-border>
<ion-navbar>
</ion-navbar>
<ion-searchbar>
</ion-searchbar>
</ion-header>
For example:
<ion-header>
<ion-searchbar id="searchbar" placeholder="City, state or postcode" (ionInput)="getItems($event)"></ion-searchbar>
<ion-toolbar no-border-top>
<ion-segment color="primary" [(ngModel)]="location">
<ion-segment-button value="venues">
<strong>Venues</strong>
</ion-segment-button>
<ion-segment-button value="breweries">
<strong>Breweries</strong>
</ion-segment-button>
</ion-segment>
</ion-toolbar>
</ion-header>
<ion-content no-bounce>
<div #map class="map-container"></div>
</ion-content>
See: https://ionicframework.com/docs/api/components/searchbar/Searchbar/
Nulra
June 2, 2018, 6:44am
3
thanks for your reply.But if no navbar then it will no back button, and if searchbar outside the navbar, it will line break to a new line.