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