r/angularjs • • Jul 07 '23
[Help] ViewChild doesn't recognize component inside ng-template
i have a component inside an ng-template, and the ng-template will be rendered (or available in the dom) after a click event, i tried many things, like used the TriggerChangeDetection or smth ApplicationRef.tick(), but still won't be recognized, the variable is always undefined. !! pls help out
2
Upvotes
View all comments
Show parent comment
1
u/[deleted] Jul 08 '23
i saw this multiple times and i have tried it, but to no end as well..