Skip to content

Angular event binding for input (type=”search”) cross icon?

How to bind an event with Angular 2 (4, 5, 6, 7) for the cross icon of an <input type="search">? Which event gets triggered?

Looking for a solution like (other than (search) because it does not work in IE):

<input type="search" (click)="search()">

Additional question: What’s the official name of this cross icon? Kinda hard googling/duckduckgoing for a solution when not knowing the right terms?

Duplicate Question: How do you detect the clearing of a “search” HTML5 input?



 <input type="search" (search)="search()">