I have a angular form with a few inputs. I need to know when the input is empty when I click a button to search without refresh the browser.
<input ng-model="formData.city" type="text" id="city-selector" placeholder="Ciudad o localidad" onfocus="this.value = '';">
If I make a search with a city "City", the next time I search with the value "" I get "City" in the controller. How can I delete this value without delete the $scope.formData?
Thanks
Aucun commentaire:
Enregistrer un commentaire