Kindly use cdkFocusInitial attribute in input field where you want to focus.
<mat-form-field>
<input matInput placeholder="username" #usernameInput cdkFocusInitial>
</mat-form-field>
Kindly use cdkFocusInitial attribute in input field where you want to focus.
<mat-form-field>
<input matInput placeholder="username" #usernameInput cdkFocusInitial>
</mat-form-field>