Initialize progress web app (#2351)
Co-authored-by: acx10 <acx10@users.noreply.github.com>
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user