Created
November 3, 2017 23:42
-
-
Save webmaxru/d6f30fcfa5751698ceb977620431e2e3 to your computer and use it in GitHub Desktop.
Registering Angular Service Worker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ServiceWorkerModule } from '@angular/service-worker' | |
import { environment } from '../environments/environment'; | |
... | |
@NgModule({ | |
imports: [ | |
... | |
environment.production ? ServiceWorkerModule.register('/ngsw-worker.js') : [] | |
], | |
... | |
}) | |
export class AppModule { } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment