[Solved] How to set focus on an input that works on IOS supporting devices?
You can use the following: @Component({ selector: ‘my-app’, template: ` <div *ngFor=”let item of [1,2,3,4]; let i = index”> <button type=”button” (click)=”display(i)”>Click to show and set focus</button> <input #theInput *ngIf=”show === i” type=”text” > </div> `, }) export class App { show = -1; @ViewChild(‘theInput’) private theInput; constructor() { } display(i) { this.show = i; … Read more