How can i set clear button ("X") into input text


#1

Hello Guys,

I am new to ionic framework and working on one cross platform mobile application.

now the problem is, how to set clear button (“X”) into input text.

please help me.

Thanks.


#2

check it out dude…may be helpful…


#3

I wrote a directive to do that. Feel free to give any suggestion.


#4

I use your directive in my app, but the input fields are not clear.
do you have any idea what might be the cause?


#5
  1. Please make sure you use “div” instead of “label” to wrap your input field.
  2. Please make sure you have add “ng-model” to input field.
    <input ng-model="searchkey" ... >