Initialize progress web app (#2351)

Co-authored-by: acx10 <acx10@users.noreply.github.com>
This commit is contained in:
ACX
2026-01-20 09:08:05 -07:00
committed by GitHub
co-authored by acx10
parent 66dee6d7e0
commit 36546061b5
21 changed files with 120 additions and 5 deletions
+6 -2
View File
@@ -14,11 +14,12 @@ import {routes} from './app/app.routes';
import {AuthInterceptorService} from './app/core/security/auth-interceptor.service';
import {AuthService, websocketInitializer} from './app/shared/service/auth.service';
import {OAuthStorage, provideOAuthClient} from 'angular-oauth2-oidc';
import {inject, provideAppInitializer, provideZoneChangeDetection} from '@angular/core';
import {inject, provideAppInitializer, provideZoneChangeDetection, isDevMode} from '@angular/core';
import {initializeAuthFactory} from './app/core/security/auth-initializer';
import {StartupService} from './app/shared/service/startup.service';
import {provideCharts, withDefaultRegisterables} from 'ng2-charts';
import ChartDataLabels from 'chartjs-plugin-datalabels';
import { provideServiceWorker } from '@angular/service-worker';
export function storageFactory(): OAuthStorage {
return localStorage;
@@ -64,6 +65,9 @@ bootstrapApplication(AppComponent, {
darkModeSelector: '.p-dark'
}
}
})
}), provideServiceWorker('ngsw-worker.js', {
enabled: !isDevMode(),
registrationStrategy: 'registerWhenStable:30000'
})
]
}).catch(err => console.error(err));