Within my codebase, I am utilizing two components - HrComponent and appcomponent. How can I effectively manage the boolean value IsBoolean from my HrComponent?
HrComponent
@Input()LoginName: string;
IsBoolean: boolean = false;
@Output()BooleanExp: EventEmitter<boolean> = new EventEmitter<boolean>();
onSelectChange() {
this.BooleanExp.emit(this.IsBoolean);
}
appcomponent
Name: string = "Hello"
<div>
<HrSelector [LoginName]="Name">
<span>{{LoginName}}</span>
<div *ngIf="IsBoolean">
<p>This is Special Div</p>
</div>
</HrSelector>
</div>