Merge pull request #4458 from tsiegleauq/foce-service-worker

Add Service Work(e|a)r(round)
This commit is contained in:
Emanuel Schütze 2019-03-05 15:03:40 +01:00 committed by GitHub
commit 118b853a91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,4 +10,9 @@ if (environment.production) {
platformBrowserDynamic()
.bootstrapModule(AppModule)
.then(() => {
if ('serviceWorker' in navigator && environment.production) {
navigator.serviceWorker.register('ngsw-worker.js');
}
})
.catch(err => console.log(err));