title: How to pass data from child to Parent in Angular 7
body: <p>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.</p>
  
  <p>I have seen this is possible by EventEmmitter but somehow that is not working for me.</p>
  
  <pre><code>@Output() selectionDialogEvent=new EventEmitter&lt;boolean&gt;();
  this.selectionDialogEvent.emit("true"); 
  </code></pre>
  
  <p>In the parent I am trying</p>
  
  <pre><code>getSelectionDialogEvents($event){
      console.log("Event received"+$event);
     this.chat=flag;
    } 
  </code></pre>