вот мой HTML-код
Код: Выделить всё
*Password is required
Код: Выделить всё
export class LoginComponent implements OnInit {
type: string = 'password';
isText: boolean = false;
eyeIcon: string = 'fa-eye-slash'
loginForm!: FormGroup;
constructor(private fb: FormBuilder){}
ngOnInit(): void {
this.loginForm = this.fb.group({
username: ['', Validators.required],
password: ['', Validators.required]
})
}
hideShowPass(){
this.isText = !this.isText
this.isText ? this.eyeIcon = "fa-eye" : this.eyeIcon = "fa-eye-slash";
this.isText ? this.type = "text" : this.type = "password"
}
}
Код: Выделить всё
input[type='text'],
input[type='password']{
border: none;
outline: none;
box-shadow: none;
width: 100%;
}
.fa-eye-slash.btn{
border: none;
outline: none;
box-shadow: none;
}
я хочу, чтобы в поле ввода отображался только один значок глаза
Подробнее здесь: https://stackoverflow.com/questions/759 ... e-eye-icon