Answers for "focus button using renderer2"

0

focus button using renderer2

<form [formGroup]="form">
    <mat-form-field class="full-width">
        <input matInput  placeholder="Focused Input">
        <button id="myInput" formControlName="myInput">TEXT</button>
  </mat-form-field>
<br>
  <button mat-raised-button color="primary" (click)="focusMyInput()">Focus</button>
</form>
Posted by: Guest on March-03-2021

Browse Popular Code Answers by Language