I have a component which contains a textarea which is hidden by default : <div class="action ui-g-2" (click)="toggleEditable()">edit</div> <textarea [hidden]="!whyModel.inEdition" #myname id="textBox_{{whyModel.id}}" pInputTextarea focus="true" [(ngModel)]="whyModel.description"></textarea> When I click on the "edit" div I want to show the textarea and put focus on it : @ViewChild('myname') input: ElementRef; ... private toggleEditable(): void { this.whyModel.toggleEditable(); this.input.nativeElement.focus(); } The "show" part is working but not the focus part. What do I miss? Continue reading...