Title: InjectionToken SwRegistrationOptions is ignored when using standalone bootstrapApplication function. · Issue #57824 · angular/angular · GitHub
Open Graph Title: InjectionToken SwRegistrationOptions is ignored when using standalone bootstrapApplication function. · Issue #57824 · angular/angular
X Title: InjectionToken SwRegistrationOptions is ignored when using standalone bootstrapApplication function. · Issue #57824 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? service-worker Is this a regression? Yes Description Hi, I've made a little repo to illustrate the issue. When using the old NgModule based syntax to init your app with a service wor...
Open Graph Description: Which @angular/* package(s) are the source of the bug? service-worker Is this a regression? Yes Description Hi, I've made a little repo to illustrate the issue. When using the old NgModule based sy...
X Description: Which @angular/* package(s) are the source of the bug? service-worker Is this a regression? Yes Description Hi, I've made a little repo to illustrate the issue. When using the old NgModule base...
Opengraph URL: https://github.com/angular/angular/issues/57824
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"InjectionToken SwRegistrationOptions is ignored when using standalone bootstrapApplication function.","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\nservice-worker\n\n### Is this a regression?\n\nYes\n\n### Description\n\nHi, I've made a little repo to illustrate the issue.\r\n\r\nWhen using the old [NgModule based syntax](https://github.com/antur84/sw-registration-options-bug/commit/22ef382f4d6d0da584bead9725c8bea277a3bfb7) to init your app with a service worker, then your provided `SwRegistrationOptions` is found and respected.\r\n\r\nRuning the app gives you a console log.\r\n\r\n[When using standalone app syntax](https://github.com/antur84/sw-registration-options-bug/commit/718936d54b03560d4cfe669e071e9e6bef8006e2#diff-4fab5baaca5c14d2de62d8d2fceef376ddddcc8e9509d86cfa5643f51b89ce3d), via `bootstrapApplication` then your provided `SwRegistrationOptions` is not not found nor respected. Runing the app does not give you a console log.\r\n\r\nLikely it was overlooked in the PR where the [provideServiceWorker](https://github.com/angular/angular/pull/48247) function was added. Or perhaps I'm just misunderstanding how it's supposed to work now.\r\n\r\n\r\n\n\n### Please provide a link to a minimal reproduction of the bug\n\nhttps://github.com/antur84/sw-registration-options-bug/commits/main/\n\n### Please provide the exception or error you saw\n\n_No response_\n\n### Please provide the environment you discovered this bug in (run `ng version`)\n\n```true\nAngular CLI: 18.2.4\r\nNode: 20.16.0\r\nPackage Manager: npm 10.8.1\r\nOS: win32 x64\r\n\r\nAngular: 18.2.4\r\n... animations, cli, common, compiler, compiler-cli, core, forms\r\n... platform-browser, platform-browser-dynamic, router\r\n... service-worker\n```\n\n\n### Anything else?\n\n_No response_","author":{"url":"https://github.com/antur84","@type":"Person","name":"antur84"},"datePublished":"2024-09-16T08:50:07Z","url":"https://github.com/angular/angular/issues/57824"}
| 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:b79a02b6-2c59-43a8-55f7-a37a858dbafc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E5DE:25598F:F5ED07:145A18E:6B0107E1 |
| html-safe-nonce | d98585470978d634b52e65c5b0e1a232a753b0c6bcd045de0b58e9cac70a4881 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNURFOjI1NTk4RjpGNUVEMDc6MTQ1QTE4RTo2QjAxMDdFMSIsInZpc2l0b3JfaWQiOiI0OTA5MTgyODQ0MTUwMDI0MTYxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 06c569ebcb2e5da420ba91924d81357fc70ef2c78022767ec926818f08f6a9b3 |
| hovercard-subject-tag | issue:2527865007 |
| 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/57824/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a88b64de0c6c38bc8dcf428d1c483579575ad00f11c28661a436297047ee674d/angular/angular/issues/57824 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a88b64de0c6c38bc8dcf428d1c483579575ad00f11c28661a436297047ee674d/angular/angular/issues/57824 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? service-worker Is this a regression? Yes Description Hi, I've made a little repo to illustrate the issue. When using the old NgModule based sy... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | antur84 |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| 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 | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width