Criança para a transferência de dados perent em angular
//app.component.ts:
prenettochild(name: any) {
alert(name);
}
//app.html:
<app-child (perentfunction)="prenettochild($event)"></app-child>
//child.component.ts:
@Output() perentfunction: EventEmitter<any> = new EventEmitter();
//button onclick function in child:
callbuttonfunction() {
this.perentfunction.emit('hello');
}
//child.html:
<button (click)="callbuttonfunction()">call perent function into child</button>
30_Savaliya Denish