79296901

Date: 2024-12-20 10:33:37
Score: 1.5
Natty:
Report link

The given solution did not work completely. After some refreshes, it again started loading multiple times. I found the actual solution for it. Which is removing the below code from main.ts,

if ('serviceWorker' in navigator) {
   navigator.serviceWorker.register('/ngsw-worker.js').then(() => {
     console.log('Service Worker Registered');
   });
}

The service worker registration anyways happens in app.module.ts, so it is not required here which causes multiple reloads of the page on launch.

Reasons:
  • Blacklisted phrase (1): did not work
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Srikanth