content_copy
export class ItemOutputComponent {
@Output() newItemEvent = new EventEmitter<string>();
addNewItem(value: string) {
this.newItemEvent.emit(value);
}
}
@Input() and @Output() give a child component a way to communicate
with its parent component.
@Input() lets a parent component update data in the child component.
@Output() lets the child send data to a parent component.
// Please click source link for more details