Initialize progress web app (#2351)
Co-authored-by: acx10 <acx10@users.noreply.github.com>
This commit is contained in:
@@ -6,11 +6,13 @@
|
||||
<title>BookLore</title>
|
||||
<base href="/">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/svg+xml" href="assets/favicon.svg" />
|
||||
<link rel="icon" type="image/svg+xml" href="assets/favicon.svg"/>
|
||||
<link rel="manifest" href="manifest.webmanifest">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<app-root></app-root>
|
||||
<noscript>Please enable JavaScript to continue using this application.</noscript>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -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