input output ionic

JavaScript
// In child.ts

import {Output, EventEmitter} from '@angular/core';
export class ChildComponent {
  ...
  @Output() typeChanged = new EventEmitter<string>();
  type = "got";

  emit() {
    this.typeChanged.emit(this.type);
  }
}
// parent.html

<div>
    <component (typeChanged)="onTypeEmitted($event)"></component>
<div>

// In parent.ts

export class ParentComponent {
  ...
  onTypeEmitted(type: string) {
    // do something with 'type'
  }
}
Source

Also in JavaScript: