1
0
Fork 0
peertube/client/src/app/core/core.module.ts

53 lines
1.3 KiB
TypeScript
Raw Normal View History

import { NgModule, Optional, SkipSelf } from '@angular/core'
import { CommonModule } from '@angular/common'
import { HttpModule } from '@angular/http'
import { RouterModule } from '@angular/router'
2017-08-28 18:28:12 +00:00
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
2016-11-20 16:18:15 +00:00
import { SimpleNotificationsModule } from 'angular2-notifications'
import { ModalModule } from 'ngx-bootstrap/modal'
import { AuthService, LoginGuard } from './auth'
import { ServerService } from './server'
import { ConfirmComponent, ConfirmService } from './confirm'
import { MenuComponent, MenuAdminComponent } from './menu'
import { throwIfAlreadyLoaded } from './module-import-guard'
2016-11-20 16:18:15 +00:00
@NgModule({
imports: [
CommonModule,
HttpModule,
RouterModule,
2017-08-28 18:28:12 +00:00
BrowserAnimationsModule,
ModalModule,
SimpleNotificationsModule.forRoot()
2016-11-20 16:18:15 +00:00
],
2017-01-23 21:32:43 +00:00
declarations: [
ConfirmComponent,
2017-01-23 21:32:43 +00:00
MenuComponent,
MenuAdminComponent
],
2017-01-23 21:32:43 +00:00
exports: [
SimpleNotificationsModule,
ConfirmComponent,
2017-01-23 21:32:43 +00:00
MenuComponent,
MenuAdminComponent
],
providers: [
AuthService,
2017-04-04 19:37:03 +00:00
ConfirmService,
ServerService,
LoginGuard
]
2016-11-20 16:18:15 +00:00
})
export class CoreModule {
constructor ( @Optional() @SkipSelf() parentModule: CoreModule) {
throwIfAlreadyLoaded(parentModule, 'CoreModule')
2016-11-20 16:18:15 +00:00
}
}