Select values of input by touch

I want the following behavior of an input-tag: If there’s a value inside the input and I touch on it to focus, the (old) value should be totally selected, to be changed by a new input on the keyboard.

I tried the following html-code:

<input #myInput id="myInput" type="number" [(ngModel)]="data" (click)="">

This is working on android devices but not on iOS devices. How can I get this on iOS devices, too?