I've created this function to save my taches
sauverTache(tache:Tache){
this.editionEnCours = true;
tache.estReelle = true;
this.sauverTache.emit(tache.id);
}
I call my function in the template like this
<div class="sbold tr" *ngFor="let tache of etapes.P0.taches, let i=index" [class.hidden]="!afficheTaches" >
<td align="right">{{tache.typeTache}} </td>
<td>
<div>
<p-calendar [(ngModel)]="etapes.P0.taches[i].dateTache" showAnim="slideDown" [class.hidden]="!editP0[i]" dateFormat="dd/mm/yy" placeholder="jj/mm/aaaa"></p-calendar>
<div class="btn btn-circle btn-default font-yellow-saffron" *ngIf="!editP0[i]" (click)="editP0[i]=!editP0[i]">
<i class="fa fa-pencil "> </i>
</div>
<div class="btn btn-circle btn-default font-green-jungle" *ngIf="editP0[i]" (click)="editP0[i]=!editP0[i]; sauverTache(etapes.P0.taches[i]);">
<i class="fa fa-check "> </i>
</div>
<div class="btn btn-circle btn-default font-red" *ngIf="editP0[i]" (click)="editP0[i]=!editP0[i]; reset();">
<i class="fa fa-remove "> </i>
</div>
</div>
</td>
</div>
and I got this error
TypeError: self.parent.parent.parent.context.sauverTache is not a function