This demand is product mention, at first just set up <input style= "padding-top:3px;" type= "Search" placeholder= "searching doctor or Hospital" ng-model= "Query" >
Type= "Search"
Found that Android can not get the search for iOS, I'm mad, after Google's search to get the conclusion that need to apply a form form outside, so add a really well and combined with the form submitted by the event directly call the button button click event ng-click= "Searchselect ()", do not need to listen for additional search keyboard Click events, saved a lot of trouble, really very practical ah, I was a genius
The HML code is as follows:
<form>
<div class= "bar bar-header item-input-inset" style= "height:50px;" >
<label class= "Item-input-wrapper" id= "Search-input" >
<i class= "icon Ion-ios-search" style= " position:relative;color:gray;font-size:1.5em;top:1px; " ></i>
<input style= "padding-top:3px" type= "search" placeholder= "searching doctor or Hospital" ng-model= "Query" >
</label>
<button class= "button button-clear" style= "color: #49B746;" ng-click= "Searchselect ()" > Search </button>
</div>
</form>
The JS code is as follows:
$scope. Searchselect = function () {
if ($scope. Currentsearchtype = = ' Hospital ') {
}else{
$scope. Search ();
}
};
The above is a small set to introduce the use of JS easy to achieve Ionic call keyboard search function (Super practical), hope to help everyone, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!