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
QueryList not iterable in constructor #3577
Comments
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Aug 11, 2015
BREAKING CHANGE: Closes angular#3577
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Aug 11, 2015
BREAKING CHANGE: Closes angular#3577
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Aug 11, 2015
BREAKING CHANGE: Closes angular#3577
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Aug 11, 2015
BREAKING CHANGE: Closes angular#3577
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Aug 12, 2015
BREAKING CHANGE: Closes angular#3577
mhevery
added a commit
to mhevery/angular
that referenced
this issue
Aug 13, 2015
BREAKING CHANGE: Closes angular#3577
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Sorry for the vague title.
This is a simple thing but I was suggested to post this as an issue by another user.
Whenever you want to access a QueryList (by Query [directives] or ViewQuery [components]) you can't iterate over the list in the constructor. If you print the list you see the results, but they are not iterable. If you iterate over them in onInit (for example) it works like it should. If this is the expected behaviour it should be documented for others users may struggle with this issue.
See this example code
Not a coding issue, but documentation. Here's a repro for both directives and components.
Edit : Just now I found this issue #2916 where is explained why this happens, but still, it should be documented.
The text was updated successfully, but these errors were encountered: