diff options
author | Chocobozzz <me@florianbigard.com> | 2018-02-22 14:15:23 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-02-22 14:15:23 +0100 |
commit | 78967fca4cacbc247fa6fb62d64b2d6825a10804 (patch) | |
tree | f063a82b0658005e3d5ce23648333805782155ed /client/src/app | |
parent | 93df58cc4865af9046d2b31e03fa37d3ae54e45b (diff) | |
download | PeerTube-78967fca4cacbc247fa6fb62d64b2d6825a10804.tar.gz PeerTube-78967fca4cacbc247fa6fb62d64b2d6825a10804.tar.zst PeerTube-78967fca4cacbc247fa6fb62d64b2d6825a10804.zip |
Register service worker
Diffstat (limited to 'client/src/app')
-rw-r--r-- | client/src/app/app.module.ts | 6 | ||||
-rw-r--r-- | client/src/app/core/core.module.ts | 8 |
2 files changed, 5 insertions, 9 deletions
diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts index 34114b60b..cae99786b 100644 --- a/client/src/app/app.module.ts +++ b/client/src/app/app.module.ts | |||
@@ -1,11 +1,9 @@ | |||
1 | import { NgModule } from '@angular/core' | 1 | import { NgModule } from '@angular/core' |
2 | import { BrowserModule } from '@angular/platform-browser' | 2 | import { BrowserModule } from '@angular/platform-browser' |
3 | import { ServiceWorkerModule } from '@angular/service-worker' | ||
4 | import { AboutModule } from '@app/about' | 3 | import { AboutModule } from '@app/about' |
5 | import { ResetPasswordModule } from '@app/reset-password' | 4 | import { ResetPasswordModule } from '@app/reset-password' |
6 | 5 | ||
7 | import { MetaLoader, MetaModule, MetaStaticLoader, PageTitlePositioning } from '@ngx-meta/core' | 6 | import { MetaLoader, MetaModule, MetaStaticLoader, PageTitlePositioning } from '@ngx-meta/core' |
8 | import { environment } from '../environments/environment' | ||
9 | 7 | ||
10 | import { AccountModule } from './account' | 8 | import { AccountModule } from './account' |
11 | 9 | ||
@@ -60,9 +58,7 @@ export function metaFactory (): MetaLoader { | |||
60 | MetaModule.forRoot({ | 58 | MetaModule.forRoot({ |
61 | provide: MetaLoader, | 59 | provide: MetaLoader, |
62 | useFactory: (metaFactory) | 60 | useFactory: (metaFactory) |
63 | }), | 61 | }) |
64 | |||
65 | ServiceWorkerModule.register('/ngsw-worker.js', { enabled: environment.production }) | ||
66 | ], | 62 | ], |
67 | providers: [ ] | 63 | providers: [ ] |
68 | }) | 64 | }) |
diff --git a/client/src/app/core/core.module.ts b/client/src/app/core/core.module.ts index 93c9741a7..eea6f340b 100644 --- a/client/src/app/core/core.module.ts +++ b/client/src/app/core/core.module.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { NgModule, Optional, SkipSelf } from '@angular/core' | ||
2 | import { CommonModule } from '@angular/common' | 1 | import { CommonModule } from '@angular/common' |
3 | import { RouterModule } from '@angular/router' | 2 | import { NgModule, Optional, SkipSelf } from '@angular/core' |
4 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations' | 3 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations' |
4 | import { RouterModule } from '@angular/router' | ||
5 | import { LoadingBarModule } from '@ngx-loading-bar/core' | 5 | import { LoadingBarModule } from '@ngx-loading-bar/core' |
6 | import { LoadingBarHttpClientModule } from '@ngx-loading-bar/http-client' | 6 | import { LoadingBarHttpClientModule } from '@ngx-loading-bar/http-client' |
7 | 7 | ||
@@ -9,10 +9,10 @@ import { SimpleNotificationsModule } from 'angular2-notifications' | |||
9 | import { ModalModule } from 'ngx-bootstrap/modal' | 9 | import { ModalModule } from 'ngx-bootstrap/modal' |
10 | 10 | ||
11 | import { AuthService } from './auth' | 11 | import { AuthService } from './auth' |
12 | import { LoginGuard, UserRightGuard } from './routing' | ||
13 | import { ServerService } from './server' | ||
14 | import { ConfirmComponent, ConfirmService } from './confirm' | 12 | import { ConfirmComponent, ConfirmService } from './confirm' |
15 | import { throwIfAlreadyLoaded } from './module-import-guard' | 13 | import { throwIfAlreadyLoaded } from './module-import-guard' |
14 | import { LoginGuard, UserRightGuard } from './routing' | ||
15 | import { ServerService } from './server' | ||
16 | 16 | ||
17 | @NgModule({ | 17 | @NgModule({ |
18 | imports: [ | 18 | imports: [ |