Delete placeholder value in input when clicking using AngularJS

5

Does anyone know how I can delete the placeholder value when I click on the field using AngularJS only?

Example: When clicking, automatically add the word name.

<input type="text" ng-model="inputText" placeholder="Nome" />
    
asked by anonymous 06.02.2017 / 14:35

2 answers

3

As follows:

<input type="text" ng-model="inputText" onfocus="this.placeholder = ''" onblur="this.placeholder = 'Nome'" placeholder="Nome" />
    
06.02.2017 / 14:40
3

With

06.02.2017 / 14:51