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
@angular/pwa show register service worker with relative path #11848
Running ng add @angular/pwd registers the service worker like so:
ServiceWorkerModule.register('/ngsw-worker.js')
This assumes that the application binaries are loaded from root.
However the build command ng build accepts the --base-href options with allows to set a base URL. The service worker should be loaded relative to this URL (just like the other static resources).
This could e.g. be done by registering the worker like this instead:
ServiceWorkerModule.register('ngsw-worker.js')
Desired functionality
Register the service worker, so it works with the --base-href option.
Activity
gkalpak commentedon Aug 13, 2018
This has been fixed in #11200. The fix is included in 6.2.0-beta.0 (but not on 6.1.x).
angular-automatic-lock-bot commentedon Sep 8, 2019
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.