Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

feat(core): fix #1024, #513, #995, add a helper lib to configure root zone#1027

Open
JiaLiPassion wants to merge 1 commit into
angular:masterangular/zone.js:masterfrom
JiaLiPassion:customize-rootJiaLiPassion/zone.js:customize-rootCopy head branch name to clipboard
Open

feat(core): fix #1024, #513, #995, add a helper lib to configure root zone#1027
JiaLiPassion wants to merge 1 commit into
angular:masterangular/zone.js:masterfrom
JiaLiPassion:customize-rootJiaLiPassion/zone.js:customize-rootCopy head branch name to clipboard

Conversation

@JiaLiPassion

Copy link
Copy Markdown
Collaborator

fix #1024, #513, #995
Add a help lib to configure root zone. It is a monkey-patch to zone (some kind of hack). And it is a lib need to be loaded by user themselves, so zone public API will not be damaged.

  • this is not a public api or formal feature of zone.js
  • it will not be included in future tc39 proposal,
  • and it is not by design, it is just a helper method to let you customize rootZone for some test and suppose to change in the future, please use it on your own risk

@mhevery , please review the idea is ok or not, I know it is not correct according to the design of Zone, but there a some use cases that user want to do that, so with or without this lib, user can still monkey-patch Zone to customize root zone, so I just provide the helper tool for them. thank you.

@mhevery

mhevery commented Mar 14, 2018

Copy link
Copy Markdown
Contributor

Not sure how I feel about this. Let me think about it...

@mleibman

Copy link
Copy Markdown
Contributor

FWIW, we ended up needing to customize a root zone in in GCP Console, but we currently do it via monkey-patching.

For us, it bridges the gap in the Zone.js API where interception is based purely on the current zone, but zone configuration is fairly static. For Angular, it captures the 'outer' zone at start up, so any code calling NgZone.runOutsideAngular() would fall back to that and escape the interceptors added on by forking the 'inner' Angular zone.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Could not intercept requestAnimationFrame from Google Maps

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.