TypeError: self.parent.parent.parent.context is not a function Angular 2
<p>I've created this function to save my <code>taches</code></p>

<pre class="lang-js prettyprint-override"><code>sauverTache(tache:Tache){

    this.editionEnCours = true;
    tache.estReelle = true;

    this.sauverTache.emit(tache.id);
}
</code></pre>

<p>
I call my function in the template like this</p>

<pre class="lang-html prettyprint-override"><code>&lt;div class="sbold tr" *ngFor="let tache of etapes.P0.taches, let i=index" [class.hidden]="!afficheTaches" &gt;
                                        &lt;td  align="right"&gt;{{tache.typeTache}}&amp;nbsp;&lt;/td&gt;
                                        &lt;td&gt;
                                            &lt;div&gt;
                                               &lt;p-calendar [(ngModel)]="etapes.P0.taches[i].dateTache"  showAnim="slideDown" [class.hidden]="!editP0[i]" dateFormat="dd/mm/yy" placeholder="jj/mm/aaaa"&gt;&lt;/p-calendar&gt;
                                                &lt;div class="btn btn-circle btn-default font-yellow-saffron" *ngIf="!editP0[i]" (click)="editP0[i]=!editP0[i]"&gt;
                                                    &lt;i class="fa fa-pencil "&gt; &lt;/i&gt;
                                                &lt;/div&gt;
                                                &lt;div class="btn btn-circle btn-default font-green-jungle" *ngIf="editP0[i]" (click)="editP0[i]=!editP0[i]; sauverTache(etapes.P0.taches[i]);"&gt;
                                                    &lt;i class="fa fa-check "&gt; &lt;/i&gt;
                                                &lt;/div&gt;
                                                &lt;div class="btn btn-circle btn-default font-red" *ngIf="editP0[i]" (click)="editP0[i]=!editP0[i]; reset();"&gt;
                                                    &lt;i class="fa fa-remove "&gt; &lt;/i&gt;
                                                &lt;/div&gt;
                                            &lt;/div&gt;
                                        &lt;/td&gt;
  &lt;/div&gt;
</code></pre>





<p>and I got this error </p>

<pre class="lang-js prettyprint-override"><code>TypeError: self.parent.parent.parent.context.sauverTache is not a function
</code></pre>