Angular CLI6
In my component, I have:
@ViewChild('necRiskAnalysisDialog')
private necRiskAnalysisDialog;
at some point I make a call to this.necRiskAnalysisDialog.set(...
In my html, I have
<div>
<div *ngIf="someCondition">
<nec-risk-analysis #necRiskAnalysisDialog></nec-risk-analysis>
</div>
</div>
I get a *undefined* for necRiskAnalysisDialog in the line where I say
this.necRiskAnalysisDialog.set
How do I get around this?
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.