import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'
import { AuthService } from '../core'
import { FormReactive } from '../shared'
import { I18n } from '@ngx-translate/i18n-polyfill'
import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
import { LoginValidatorsService } from '@app/shared/forms/form-validators/login-validators.service'
import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'
import { AuthService } from '../core'
import { FormReactive } from '../shared'
import { I18n } from '@ngx-translate/i18n-polyfill'
import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
import { LoginValidatorsService } from '@app/shared/forms/form-validators/login-validators.service'
import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'
- @ViewChild('emailInput') input: ElementRef
- @ViewChild('forgotPasswordModal') forgotPasswordModal: ElementRef
- @ViewChild('forgotPasswordEmailInput') forgotPasswordEmailInput: ElementRef
+ @ViewChild('emailInput', { static: true }) input: ElementRef
+ @ViewChild('forgotPasswordModal', { static: true }) forgotPasswordModal: ElementRef
private modalService: NgbModal,
private loginValidatorsService: LoginValidatorsService,
private authService: AuthService,
private userService: UserService,
private modalService: NgbModal,
private loginValidatorsService: LoginValidatorsService,
private authService: AuthService,
private userService: UserService,
this.buildForm({
username: this.loginValidatorsService.LOGIN_USERNAME,
password: this.loginValidatorsService.LOGIN_PASSWORD
this.buildForm({
username: this.loginValidatorsService.LOGIN_USERNAME,
password: this.loginValidatorsService.LOGIN_PASSWORD
openForgotPasswordModal () {
this.openedForgotPasswordModal = this.modalService.open(this.forgotPasswordModal)
}
openForgotPasswordModal () {
this.openedForgotPasswordModal = this.modalService.open(this.forgotPasswordModal)
}