1
My intention is for a close-up button to appear inside the input
so that by clicking on it, the search query is reassembled and returns all the items again and not just the items of the search in question. This button should disappear while the user does not type again in the search field. It seems that I did everything right, but the ng-click
is not working on button
within the element label
. Look at the code:
<label class="item-input-wrapper">
<i class="icon ion-ios-search placeholder-icon"></i>
<input type="search" placeholder="Buscar por Evento" ng-model="busca.evento">
<button class="button" ng-hide="btnZerar" ng-click="zerar()">
<i class="ion-ios-close-outline"></i>
</button>
</label>
And on the controller:
$scope.zerar = function() {
$scope.btnZerar = true;
carregaEventosInicio();
};
Note: I am using the Ionic Framework. Can someone help me?
Why don’t you use one
div
instead oflabel
?– DiegoAugusto
You saved my job. Thank you Techies.
– David Coelho
Not at all @David :p
– DiegoAugusto
Put the problem solution as the answer if you have solved it.
– DiegoAugusto
I don’t know how to do it.
– David Coelho
press on the "Check" icon below the voting arrow of his reply ;)
– celsomtrindade