You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can anyone please help and provide some example of using queries field?
I try to use ViewChild to get the myChildComponent reference within the rootComponent class. However, it always returns undefined in ngAfterViewInit and ngAfterViewChecked
on the documentation, it says better to use queries field. However, there is no further example for that.
Any help is appreciated.
Thanks
The text was updated successfully, but these errors were encountered:
also using queries is not recommended if you wanna query anything within dynamic scope ( content within ngIf or ngRepeat etc ), because those things are not guaranteed to be present, so it will return undefined most of the time
Can anyone please help and provide some example of using queries field?
I try to use ViewChild to get the myChildComponent reference within the rootComponent class. However, it always returns undefined in ngAfterViewInit and ngAfterViewChecked
on the documentation, it says better to use queries field. However, there is no further example for that.
Any help is appreciated.
Thanks
The text was updated successfully, but these errors were encountered: