Skip to content
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

fix(core): require 'static' flag on queries in typings #30639

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
4 participants
@alxhub
Copy link
Contributor

commented May 23, 2019

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)

@alxhub alxhub requested review from angular/fw-compiler as code owners May 23, 2019

@googlebot googlebot added the cla: yes label May 23, 2019

@alxhub alxhub force-pushed the alxhub:v8/static-queries branch from 1a197fb to 7c62398 May 23, 2019

@alxhub alxhub requested a review from angular/fw-public-api as a code owner May 23, 2019

@alxhub alxhub force-pushed the alxhub:v8/static-queries branch 2 times, most recently from b21f401 to e69763e May 23, 2019

@alxhub alxhub requested a review from angular/fw-integration as a code owner May 23, 2019

@alxhub alxhub referenced this pull request May 23, 2019

Closed

V8/static queries patch #30641

@alxhub

This comment has been minimized.

Copy link
Contributor Author

commented May 23, 2019

@kara

kara approved these changes May 23, 2019

Copy link
Contributor

left a comment

LGTM

@kara

This comment has been minimized.

Copy link
Contributor

commented May 23, 2019

merge assistance: global approval

@kara

This comment has been minimized.

Copy link
Contributor

commented May 23, 2019

Note: needs global TAP presubmit first

fix(core): require 'static' flag on queries in typings
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.

@alxhub alxhub force-pushed the alxhub:v8/static-queries branch from e69763e to c06c972 May 23, 2019

@alxhub alxhub requested review from angular/docs-infra as code owners May 23, 2019

@petebacondarwin
Copy link
Member

left a comment

Should there also be an update to the cheatsheet? https://github.com/angular/angular/blob/master/aio/content/guide/cheatsheet.md

@petebacondarwin
Copy link
Member

left a comment

Approved from docs-infra POV

@ngbot

This comment has been minimized.

Copy link

commented May 24, 2019

I see that you just added the PR action: merge label, but the following checks are still failing:
    failure status "ci-codefresh-bazel" is failing

If you want your PR to be merged, it has to pass all the CI checks.

If you can't get the PR to a green state due to flakes or broken master, please try rebasing to master and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help.

@alxhub

This comment has been minimized.

Copy link
Contributor Author

commented May 24, 2019

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.

@matsko matsko closed this in 84dd267 May 24, 2019

alxhub added a commit to alxhub/angular that referenced this pull request May 24, 2019

fix(ivy): fix PR collision with static: true and new test
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.

pull bot pushed a commit to sfeir-open-source/angular that referenced this pull request May 24, 2019

fix(ivy): fix PR collision with static: true and new test (angular#30666
)

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.

PR Close angular#30666
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.