-
Notifications
You must be signed in to change notification settings - Fork 24.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] RC.2 breaks @ViewChild to component thru forwardRef (recursive component structures) #9459
Comments
Thanks, that does look even more relevant. |
@tycho01 could you please share a minimal plunker (please use RC.3)? I'm surprised that it used to work, would like to confirm. |
Would that work ?
|
Yep, I'm still very much surprised it used to work without |
Yeah, that seems to be helping. Thanks for the quick suggestions guys. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
After this commit from RC2 ("set fixed
@ViewChild
/@ContentChild
right after the view is created"), my@ViewChild
s started breaking, erroring with:Can't construct a query for the property <viewChildName> of <componentName> since the query selector wasn't defined
.Since I'm using recursive component structures, I have to use
forwardRef
to include the child components as directives into the host component. So what I have is like this:The undefined selector here is the
ChildComp
argument of@ViewChild(ChildComp)
. If thisforwardRef
is not yet resolved here at the moment it's interpreting theViewChild
since RC2, then I guess it makes sense that it's coming up with an undefined selector.I've yet to verify that with a minimal reproduction though. Plunker forthcoming -- I may need to await until my recent PR lands into the next RC. Anyway, posting this already in case anyone else has come across this error as well.
The text was updated successfully, but these errors were encountered: