<label i18n for="username">User</label>
<input
type="text" id="username" i18n-placeholder placeholder="Username or email address" required tabindex="1"
- formControlName="username" [ngClass]="{ 'input-error': formErrors['username'] }"
+ formControlName="username" [ngClass]="{ 'input-error': formErrors['username'] }" #emailInput
>
<a i18n *ngIf="signupAllowed === true" routerLink="/signup" class="create-an-account">
or create an account
})
export class LoginComponent extends FormReactive implements OnInit {
+ @ViewChild('emailInput') input: ElementRef
@ViewChild('forgotPasswordModal') forgotPasswordModal: ElementRef
@ViewChild('forgotPasswordEmailInput') forgotPasswordEmailInput: ElementRef
username: this.loginValidatorsService.LOGIN_USERNAME,
password: this.loginValidatorsService.LOGIN_PASSWORD
})
+
+ this.input.nativeElement.focus()
}
login () {