feat(service-worker): add function to provide service worker#48247
feat(service-worker): add function to provide service worker#48247jsaguet wants to merge 1 commit intoangular:mainfrom
Conversation
d5ccc65 to
a6a079a
Compare
AndrewKushnir
left a comment
There was a problem hiding this comment.
@jsaguet thanks for creating this PR, it looks great! I've just left a few comments, please take a look when you get a chance. Thank you.
f885794 to
c8d8ad4
Compare
AndrewKushnir
left a comment
There was a problem hiding this comment.
@jsaguet the changes look good, thanks for addressing the feedback! I'm adding an approval, but since this PR touches public API, it'd require a couple more reviews (you may receive some extra feedback). Thank you.
|
@alxhub FYI this PR would require your review, since I'm not a part of |
add function `provideServiceWorker` to register a service worker in standalone applications without using `ServiceWorkerModule.register()`
c8d8ad4 to
fb67f8a
Compare
atscott
left a comment
There was a problem hiding this comment.
reviewed-for: public-api
AndrewKushnir
left a comment
There was a problem hiding this comment.
Reviewed-for: public-api
|
Caretaker note: this PR is ready for merge. There are no changes to the underlying ServiceWorker logic, the change is more about exposing a new public API (standalone version of the API to enable ServiceWorker integration). |
|
This PR was merged into the repository by commit 5e7fc25. |
|
@jsaguet thanks again for creating this PR and addressing the feedback! 👍 This PR is now merged and will be released as a part of the upcoming v16 in a few weeks. |
|
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. |
PR Type
What kind of change does this PR introduce?
What is the current behavior?
The only way to register a service worker is by using
ServiceWorkerModule.register().For standalone applications, we must use
importProvidersFrom(ServiceWorkerModule.register(...)).Issue Number: #47793
What is the new behavior?
This PR introduces a function
provideServiceWorkerto replace the call toServiceWorkerModule.register()and hence avoid usingNgModulesto use service workers when building standalone applications.Does this PR introduce a breaking change?
Other information