You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a function to provide ServiceWorker support without referencing NgModules #47793
We need to provide a function (like provideServiceWorkerSupport) to replace the ServiceWorkerModule.register call, so that there is no need to import and use NgModule in standalone use-cases.
changed the title [-]Add a function to avoid the need to use ServiceWorkerModule (for standalone use-cases)[/-][+]Add a function to provide ServiceWorker support without referencing NgModules[/+]on Oct 17, 2022
This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we'll move it to our consideration list.
You can find more details about the feature request process in our documentation.
@MaximSagan yes, it would be equivalent to the importProvidersFrom(ServiceWorkerModule.register(...)) call and just return the set of providers similar to the one that is returned by the ServiceWorkerModule.register call.
Activity
[-]Add a function to avoid the need to use ServiceWorkerModule (for standalone use-cases)[/-][+]Add a function to provide ServiceWorker support without referencing NgModules[/+]MaximSagan commentedon Oct 18, 2022
Would this function be equivalent to the following?
angular-robot commentedon Oct 18, 2022
This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we'll move it to our consideration list.
You can find more details about the feature request process in our documentation.
AndrewKushnir commentedon Oct 18, 2022
@MaximSagan yes, it would be equivalent to the
importProvidersFrom(ServiceWorkerModule.register(...))call and just return the set of providers similar to the one that is returned by theServiceWorkerModule.registercall.DibyodyutiMondal commentedon Mar 19, 2023
Is it not possible to have an overload that allows us to provide a custom url for the service-worker?
That would allow us to use something else (like workbox) to write our own service worker and use that with angular.
AndrewKushnir commentedon Mar 19, 2023
@DibyodyutiMondal the APIs provide a way to define a script location (see https://next.angular.io/api/service-worker/provideServiceWorker). If this is not sufficient, feel free to open a feature request in the Issue tracker.
I'm going to close this ticket, since the PR that addresses it was merged (#48247).
angular-automatic-lock-bot commentedon Apr 19, 2023
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.