Register service worker
[oweals/peertube.git] / client / src / app / app.module.ts
1 import { NgModule } from '@angular/core'
2 import { BrowserModule } from '@angular/platform-browser'
3 import { AboutModule } from '@app/about'
4 import { ResetPasswordModule } from '@app/reset-password'
5
6 import { MetaLoader, MetaModule, MetaStaticLoader, PageTitlePositioning } from '@ngx-meta/core'
7
8 import { AccountModule } from './account'
9
10 import { AppRoutingModule } from './app-routing.module'
11 import { AppComponent } from './app.component'
12 import { CoreModule } from './core'
13 import { HeaderComponent } from './header'
14 import { LoginModule } from './login'
15 import { MenuComponent } from './menu'
16 import { SharedModule } from './shared'
17 import { SignupModule } from './signup'
18 import { VideosModule } from './videos'
19
20 export function metaFactory (): MetaLoader {
21   return new MetaStaticLoader({
22     pageTitlePositioning: PageTitlePositioning.PrependPageTitle,
23     pageTitleSeparator: ' - ',
24     applicationName: 'PeerTube',
25     defaults: {
26       title: 'PeerTube',
27       description: 'PeerTube, a federated (ActivityPub) video streaming platform  ' +
28                    'using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular. '
29     }
30   })
31 }
32
33 @NgModule({
34   bootstrap: [ AppComponent ],
35   declarations: [
36     AppComponent,
37
38     MenuComponent,
39     HeaderComponent
40   ],
41   imports: [
42     BrowserModule,
43
44     CoreModule,
45     SharedModule,
46
47     AppRoutingModule,
48
49     AccountModule,
50     CoreModule,
51     LoginModule,
52     ResetPasswordModule,
53     SignupModule,
54     SharedModule,
55     VideosModule,
56     AboutModule,
57
58     MetaModule.forRoot({
59       provide: MetaLoader,
60       useFactory: (metaFactory)
61     })
62   ],
63   providers: [ ]
64 })
65 export class AppModule {}