typescript - Output from nested child to parent to grand-parent component in Angular -


hi angular community !

my issue tried fired child output gran parent child open or close parent fired child , output same way, bit post plus gran parent how use @output fire boolean child parent ps: note child fired/hide parent , gran parent..thanks , if it's not clear don't hesitate ask me details..

gran parent.html:

<div class="daydetail">  <img src="./assets/img/fold_down_black.png" class="clickdaydetail" type="button" label="click"(click)="togglechild()"/>  <div><my-daydetail [showmepartially]="showvar"(close)="ishidden = true" (open)="ishidden = false"></my-daydetail></div>   <div [hidden]="ishidden" >       <div><app-pie-chart [minifiedme]="showvar" ></app-pie-chart> </div>     <div><app-fonctionnaly [minifiedme]="showvar"  ></app-fonctionnaly></div>   </div> <!-- fin de ishidden --> 

parent.html:

<div *ngif="showmepartially" class="daydetail2" > <!-- part toggled parent component button  -->   <img type="button" label="click" (click)="hidedem()" id="foldup" src="./assets/img/fold_up_blacksmall.png"/>   <span id="infonc">informations sur le fonctionnement</span> </div> <!-- fin de daydetail2 -->  <p class="taux2">taux de fonctionnement sur la période</p>  <img type="button" label="click" (click)="hidedem2()" src="./assets/img/fold_up_blacksmall.png"/> <app-my-verticalchart [showmepartially2]="showvar" (closed)="ishiddenn = true" (opened)="ishiddenn = false"></app-my-verticalchart> 

parent.ts

@input() showmepartially: boolean; @input() showmepartially2: boolean; @output() open: eventemitter<any> = new eventemitter(); @output() close: eventemitter<any> = new eventemitter(); @output() opened: eventemitter<any> = new eventemitter(); @output() closed: eventemitter<any> = new eventemitter(); 

child.html

<div *ngif="showmepartially2" class="chart2">       <chart [options]="options" (load)="saveinstance($event.context)">       <!--    <point (select)="onpointselect($event)"></point> -->       </chart> <!--  <p><b>{{point}}</b><p> --> </div>  <!-- ================ fin de chart2 ================ --> 

child.ts

 @input() showmepartially2: boolean; 


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -