PeerTube/client/src/app/app.module.ts

64 lines
1.7 KiB
TypeScript
Raw Normal View History

2017-12-11 10:36:46 -06:00
import { NgModule } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
2018-01-31 10:47:36 -06:00
import { AboutModule } from '@app/about'
2018-03-22 08:13:30 -05:00
import { ServerService } from '@app/core'
2018-01-30 06:27:07 -06:00
import { ResetPasswordModule } from '@app/reset-password'
2016-09-06 15:40:57 -05:00
2018-01-30 06:27:07 -06:00
import { MetaLoader, MetaModule, MetaStaticLoader, PageTitlePositioning } from '@ngx-meta/core'
import { AppRoutingModule } from './app-routing.module'
import { AppComponent } from './app.component'
import { CoreModule } from './core'
2018-01-30 06:27:07 -06:00
import { HeaderComponent } from './header'
import { LoginModule } from './login'
2018-01-30 06:27:07 -06:00
import { MenuComponent } from './menu'
import { SharedModule } from './shared'
2018-01-30 06:27:07 -06:00
import { SignupModule } from './signup'
import { VideosModule } from './videos'
2016-11-20 10:18:15 -06:00
2018-03-22 08:13:30 -05:00
export function metaFactory (serverService: ServerService): MetaLoader {
2017-03-10 03:33:36 -06:00
return new MetaStaticLoader({
pageTitlePositioning: PageTitlePositioning.PrependPageTitle,
pageTitleSeparator: ' - ',
2018-03-22 08:13:30 -05:00
get applicationName () { return serverService.getConfig().instance.name },
2017-03-10 03:33:36 -06:00
defaults: {
2018-03-22 08:13:30 -05:00
get title () { return serverService.getConfig().instance.name },
get description () { return serverService.getConfig().instance.shortDescription }
2017-03-10 03:33:36 -06:00
}
})
2017-03-10 03:33:36 -06:00
}
2016-11-04 11:25:26 -05:00
2016-09-06 15:40:57 -05:00
@NgModule({
bootstrap: [ AppComponent ],
declarations: [
2017-12-01 02:20:19 -06:00
AppComponent,
MenuComponent,
2017-12-05 10:46:33 -06:00
HeaderComponent
2016-09-06 15:40:57 -05:00
],
2016-11-20 10:18:15 -06:00
imports: [
2016-09-06 15:40:57 -05:00
BrowserModule,
2016-09-09 15:23:41 -05:00
2016-11-20 10:18:15 -06:00
CoreModule,
SharedModule,
AppRoutingModule,
2016-11-04 11:25:26 -05:00
2016-11-20 10:18:15 -06:00
CoreModule,
LoginModule,
2018-01-30 06:27:07 -06:00
ResetPasswordModule,
2017-04-10 13:29:33 -05:00
SignupModule,
2016-11-20 10:18:15 -06:00
SharedModule,
2017-03-12 12:40:05 -05:00
VideosModule,
2018-01-31 10:47:36 -06:00
AboutModule,
2017-03-12 12:40:05 -05:00
MetaModule.forRoot({
provide: MetaLoader,
2018-03-22 08:13:30 -05:00
useFactory: (metaFactory),
deps: [ ServerService ]
2018-02-22 07:15:23 -06:00
})
2016-09-06 15:40:57 -05:00
],
2017-12-11 10:36:46 -06:00
providers: [ ]
2016-09-06 15:40:57 -05:00
})
2017-12-11 10:36:46 -06:00
export class AppModule {}