Repository navigation
Conversation
alxhub
force-pushed
the
v8/static-queries
branch
2 times, most recently
from
May 23, 2019 19:51
b21f401 to
e69763e
Compare
Member
Author
Contributor
|
merge assistance: global approval |
Contributor
|
Note: needs global TAP presubmit first |
This commit makes the static flag on @ViewChild and @ContentChild required. BREAKING CHANGE: In Angular version 8, it's required that all @ViewChild and @ContentChild queries have a 'static' flag specifying whether the query is 'static' or 'dynamic'. The compiler previously sorted queries automatically, but in 8.0 developers are required to explicitly specify which behavior is wanted. This is a temporary requirement as part of a migration; see https://angular.io/guide/static-query-migration for more details. @ViewChildren and @ContentChildren queries are always dynamic, and so are unaffected.
petebacondarwin
left a comment
Contributor
There was a problem hiding this comment.
Should there also be an update to the cheatsheet? https://github.com/angular/angular/blob/master/aio/content/guide/cheatsheet.md
petebacondarwin
approved these changes
May 24, 2019
petebacondarwin
left a comment
Contributor
There was a problem hiding this comment.
Approved from docs-infra POV
Member
Author
|
Caretaker: the codefresh status appears to be out of date - the error shown was for a previous version of this commit. I don't know how to restart it. |
alxhub
added a commit
to alxhub/angular
that referenced
this pull request
May 24, 2019
This fixes a collision between angular#30639 and angular#30543 where the latter added usages of @ViewChild without the static flag present, but the former made the flag required.
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This commit makes the static flag on @ViewChild and @ContentChild required.
BREAKING CHANGE
Starting with v8.0, Angular requires that all @ViewChild and @ContentChild
queries have a 'static' flag specifying whether the query is 'static' or
'dynamic'. The compiler previously sorted queries automatically, but in
8.0 developers are required to explicitly specify which behavior is wanted.
@ViewChildren and @ContentChildren queries are always dynamic, and so are
unaffected.
See https://angular.io/guide/static-query-migration for more details (link not functional yet)