You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
795 B
TypeScript
33 lines
795 B
TypeScript
import { Component, EventEmitter, forwardRef, Input, Output } from '@angular/core';
|
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
|
|
@Component({
|
|
selector: 'app-password-hide-show',
|
|
imports: [],
|
|
providers: [{
|
|
provide: NG_VALUE_ACCESSOR,
|
|
useExisting: forwardRef(() => PasswordHideShowComponent),
|
|
multi: true
|
|
}],
|
|
templateUrl: './password-hide-show.component.html',
|
|
styleUrl: './password-hide-show.component.scss'
|
|
})
|
|
export class PasswordHideShowComponent {
|
|
@Output() onEyeClick = new EventEmitter();
|
|
@Input() showPassword : boolean = false;
|
|
inputType : String = '';
|
|
constructor() { }
|
|
|
|
ngOnInit(): void {
|
|
|
|
}
|
|
|
|
togglePassword(){
|
|
this.showPassword = !this.showPassword;
|
|
this.onEyeClick.emit();
|
|
}
|
|
reset() {
|
|
this.showPassword = true;
|
|
}
|
|
}
|