I have this variable which controls if a dialog shows up or not, it works on the first time, but not on a second time, emit excutes but the receiveing function is no longer called.
parent class:
isLogin :boolean ;
constructor(...){
this.isLogin = false;
}
receiveNotification(notification: boolean): void {
this.isLogin = notification;
}
parent html:
<login-dialog *ngIf="!isLogin" name="{{name}}" (notify)="receiveNotification($event)"></login-dialog>
in the child class: I have a function that when triggered calls emit and emit is indeed called just doesn't trigger the function on the parent on a second time
@Output() notify = new EventEmitter<any>();
exampleFunction(){
this.notify.emit(true);
}
I think maybe this is connected to the ngIf but not sure, what is wrong here?