Answer the question
In order to leave comments, you need to log in
Angular 2, how to know the state of a child ngIf without touching the child/component's code?
<roo-component>
<div *ngIf="canOrNot">Oooops</div>
</root-component>
@NgIfChildDirective() private ngIfD;
....
this.ngIfD.subscribe();
Answer the question
In order to leave comments, you need to log in
if it is planned to use the subscriber, then it is enough to simply emit all changes to the canOrNot variable in the roo-component
I am making an analogue from vue js, I went the way of my directives instead of ngIf. <transition></transition>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question