Title: zone.js: zone lost inside requireJS (AMD) module · Issue #38516 · angular/angular · GitHub
Open Graph Title: zone.js: zone lost inside requireJS (AMD) module · Issue #38516 · angular/angular
X Title: zone.js: zone lost inside requireJS (AMD) module · Issue #38516 · angular/angular
Description: 🐞 bug report Affected Package The issue is caused by package @angular/packages/zone.js Is this a regression? Yes, worked in 0.9.1 Description When loading modules using requireJS, the zone is lost. 🔬 Minimal Reproduction The following in...
Open Graph Description: 🐞 bug report Affected Package The issue is caused by package @angular/packages/zone.js Is this a regression? Yes, worked in 0.9.1 Description When loading modules using requireJS, the zone is lost....
X Description: 🐞 bug report Affected Package The issue is caused by package @angular/packages/zone.js Is this a regression? Yes, worked in 0.9.1 Description When loading modules using requireJS, the zone is lost....
Opengraph URL: https://github.com/angular/angular/issues/38516
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"zone.js: zone lost inside requireJS (AMD) module","articleBody":"# 🐞 bug report\r\n\r\n### Affected Package\r\nThe issue is caused by package @angular/packages/zone.js\r\n\r\n### Is this a regression?\r\nYes, worked in 0.9.1\r\n\r\n### Description\r\nWhen loading modules using requireJS, the zone is lost.\r\n\r\n## 🔬 Minimal Reproduction\r\nThe following \u003cbody> in index.html, which should also include zone.js\r\n\u003cpre>\u003ccode>\r\n \u003cscript src=\"zone.js\">\u003c/script>\r\n \u003cscript src=\"../node_modules/requirejs/require.js\">\u003c/script>\r\n \u003cscript>\r\n function testOne () {\r\n Zone.current.fork({name:'one-zone'})\r\n .run(() => new Promise((resolve) => {\r\n // load one.js\r\n requirejs(['one'], (one) => {\r\n one();\r\n resolve(one);\r\n });\r\n }));\r\n }\r\n\r\n // bootstrap\r\n Zone.current.fork({ name: 'main' }).run(testOne);\r\n \u003c/script>\r\n\u003c/body>`\r\n\u003c/code>\u003c/pre>\r\n\r\nthe entire contents of one.js, in the same folder of index.html\r\n\u003cpre>\u003ccode>\r\nconsole.log('outside module \"one\" : ' + window.Zone.current.name); \r\ndefine(() => {\r\n console.log('module \"one\": ' + window.Zone.current.name); \r\n return () => {\r\n console.log('module \"one\" function: ' + window.Zone.current.name); \r\n }\r\n});\r\n\u003c/code>\u003c/pre>\r\n\r\nIn 0.10.X, all three console.logs report the name of the zone as the `\u003croot>`, and not my `one-zone`.\r\n\r\nWith 0.9.1, I see the following:\r\n```\r\noutside module \"one\" : \u003croot>\r\nmodule \"one\": one-zone\r\nmodule \"one\" function: one-zone\r\n```\r\n\r\n## 🌍 Your Environment\r\n\r\n**Angular Version:**\r\n\u003cpre>\u003ccode>\r\nangular: 10.1.0-next.6\r\nzone.js: 0.10.3\r\nrequirejs: 2.3.6\r\n\u003c/code>\u003c/pre>\r\n","author":{"url":"https://github.com/mblout","@type":"Person","name":"mblout"},"datePublished":"2020-08-18T18:19:53Z","url":"https://github.com/angular/angular/issues/38516"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1203ad7d-0e2f-982a-a2c4-1e867ddbe938 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E2AA:2454CC:1DBEB1C:25B6D18:6B0161FA |
| html-safe-nonce | 4f62e376a49b443ae1ef8d6527460f3717ce70b7275ea92073adc0420d15ea93 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMkFBOjI0NTRDQzoxREJFQjFDOjI1QjZEMTg6NkIwMTYxRkEiLCJ2aXNpdG9yX2lkIjoiMjA2Njg2MTg1NjYwOTM2MjQyNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2cd24d81f1cdbd37223c864d3eac001da7c597bb1d1a0a1c2b7bee40df6a63cf |
| hovercard-subject-tag | issue:681240529 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/38516/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a896aed2919ed695cc0b62c1b3dab9a1e7f38fa5c92313ccc2882f6ba325a9e3/angular/angular/issues/38516 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a896aed2919ed695cc0b62c1b3dab9a1e7f38fa5c92313ccc2882f6ba325a9e3/angular/angular/issues/38516 |
| og:image:alt | 🐞 bug report Affected Package The issue is caused by package @angular/packages/zone.js Is this a regression? Yes, worked in 0.9.1 Description When loading modules using requireJS, the zone is lost.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mblout |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width