]>
Commit | Line | Data |
---|---|---|
63c4db6d | 1 | import { NgModule } from '@angular/core' |
df98563e | 2 | import { BrowserModule } from '@angular/platform-browser' |
36f9424f | 3 | import { AboutModule } from '@app/about' |
63ac2857 | 4 | import { ServerService } from '@app/core' |
ecb4e35f | 5 | import { ResetPasswordModule } from '@app/reset-password' |
ab32b0fc | 6 | |
ecb4e35f C |
7 | import { MetaLoader, MetaModule, MetaStaticLoader, PageTitlePositioning } from '@ngx-meta/core' |
8 | ||
df98563e C |
9 | import { AppRoutingModule } from './app-routing.module' |
10 | import { AppComponent } from './app.component' | |
df98563e | 11 | import { CoreModule } from './core' |
ecb4e35f | 12 | import { HeaderComponent } from './header' |
df98563e | 13 | import { LoginModule } from './login' |
ecb4e35f | 14 | import { MenuComponent } from './menu' |
df98563e | 15 | import { SharedModule } from './shared' |
ecb4e35f | 16 | import { SignupModule } from './signup' |
df98563e | 17 | import { VideosModule } from './videos' |
693b1aba | 18 | |
63ac2857 | 19 | export 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 | 63 | export class AppModule {} |