-
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
fix(router): better ngZone checking for warning #25839
Conversation
@JiaLiPassion Can you review this PR? |
@atscott , sure, I will check this one. |
Do not warn that navigation was triggered outside Angular zone if the Router was created outside Angular zone in the first place. Closes angular#25837
c56e5a7
to
7ab7aa7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Adding my approval and marking as ready for merge, pending presubmit results.
@JiaLiPassion - please let me know if you notice anything particularly alarming about this change. It seems reasonable to me and at this point I'm in favor of the "merge and see what happens" strategy if we can't make a definitive decision one way or another; this is only a dev-mode warning that wouldn't affect production applications but does appear to cause a lot of friction in tests as it is.
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. |
Closes #25837
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #25837
NgZone.isInAngularZone()
results tofalse
in testing, and cause warning.What is the new behavior?
Checking
NgZone.isInAngularZone()
when constructingRouter
, consideringNgZone
not enabled when result beingfalse
.Does this PR introduce a breaking change?
Other information