]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/app.module.ts
Merge branch 'develop' of framagit.org:chocobozzz/PeerTube into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / app.module.ts
CommitLineData
63c4db6d 1import { NgModule } from '@angular/core'
df98563e 2import { BrowserModule } from '@angular/platform-browser'
36f9424f 3import { AboutModule } from '@app/about'
63ac2857 4import { ServerService } from '@app/core'
ecb4e35f 5import { ResetPasswordModule } from '@app/reset-password'
ab32b0fc 6
ecb4e35f
C
7import { MetaLoader, MetaModule, MetaStaticLoader, PageTitlePositioning } from '@ngx-meta/core'
8
9import { AccountModule } from './account'
b58c69a1 10
df98563e
C
11import { AppRoutingModule } from './app-routing.module'
12import { AppComponent } from './app.component'
df98563e 13import { CoreModule } from './core'
ecb4e35f 14import { HeaderComponent } from './header'
df98563e 15import { LoginModule } from './login'
ecb4e35f 16import { MenuComponent } from './menu'
df98563e 17import { SharedModule } from './shared'
ecb4e35f 18import { SignupModule } from './signup'
df98563e 19import { VideosModule } from './videos'
693b1aba 20
63ac2857 21export function metaFactory (serverService: ServerService): MetaLoader {
758b996d
C
22 return new MetaStaticLoader({
23 pageTitlePositioning: PageTitlePositioning.PrependPageTitle,
24 pageTitleSeparator: ' - ',
63ac2857 25 get applicationName () { return serverService.getConfig().instance.name },
758b996d 26 defaults: {
63ac2857
C
27 get title () { return serverService.getConfig().instance.name },
28 get description () { return serverService.getConfig().instance.shortDescription }
758b996d 29 }
df98563e 30 })
758b996d 31}
b58c69a1 32
ab32b0fc
C
33@NgModule({
34 bootstrap: [ AppComponent ],
35 declarations: [
b33f657c
C
36 AppComponent,
37
38 MenuComponent,
f3aaa9a9 39 HeaderComponent
ab32b0fc 40 ],
693b1aba 41 imports: [
ab32b0fc 42 BrowserModule,
23bcf666 43
693b1aba
C
44 CoreModule,
45 SharedModule,
46
47 AppRoutingModule,
b58c69a1 48
693b1aba 49 AccountModule,
693b1aba
C
50 CoreModule,
51 LoginModule,
ecb4e35f 52 ResetPasswordModule,
a184c71b 53 SignupModule,
693b1aba 54 SharedModule,
55b33946 55 VideosModule,
36f9424f 56 AboutModule,
55b33946
C
57
58 MetaModule.forRoot({
59 provide: MetaLoader,
63ac2857
C
60 useFactory: (metaFactory),
61 deps: [ ServerService ]
78967fca 62 })
ab32b0fc 63 ],
63c4db6d 64 providers: [ ]
ab32b0fc 65})
63c4db6d 66export class AppModule {}