I have a ts file app.component.ts which has a boolean variable "flag" , I created a component named dialog , my need is to set the variable from app.component.ts from dialog.ts.
I have seen this is possible by EventEmmitter but somehow that is not working for me.
@Output() selectionDialogEvent=new EventEmitter<boolean>(); this.selectionDialogEvent.emit("true"); In the parent I am trying
getSelectionDialogEvents($event){ console.log("Event received"+$event); this.chat=flag; }