Angular 4 call parent method in a child component

import { Output, EventEmitter } from '@angular/core'; 

...

class ChildComponent {
  @Output() someEvent = new EventEmitter<string>();

  callParent(): void {
    this.someEvent.next('somePhone');
  }
}

In ContactInfo‘s template

<child-component (someEvent)="deletePhone($event)"

Leave a Comment