Child.component.ts

export class ChildComponent implements OnInit {

  @Input() parentInput: string = '';  
  @Output() childOutput = new EventEmitter<string>();

  message: string = '';

  constructor() {}

  ngOnInit() {}

  sendMessage() {
    this.childOutput.emit(this.message);
  }
}