I want to have a search button in the top right which is simple enough, but then when it is clicked, the nav title and buttons are replaced with a search input. Then when this loses focus or is cancelled, the nav bar is returned to the original state.
Any chance any of you have added google autocomplete to your ion-nav-title search bar? Using Google Maps Javascript API I can’t get autocomplete to bind to the input field based on its id. If I put the search bar in <ion-content> it works fine, but in the ion-nav-title bar its like it can’t see the element ID.
var input = ( document.getElementById('searchCity') ) ;
var autocomplete = new google.maps.places.Autocomplete(input) ;
The above returns an error with Google: InvalidValueError: not an instance of HTMLInput Element
If I move the above input code to the ion-content section, it all works fine.