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

48 lines
1.1 KiB
TypeScript
Raw Normal View History

2016-11-20 10:18:15 -06:00
import { NgModule, Optional, SkipSelf } from '@angular/core';
import { CommonModule } from '@angular/common';
import { HttpModule } from '@angular/http';
import { RouterModule } from '@angular/router';
2016-11-20 10:18:15 -06:00
import { SimpleNotificationsModule } from 'angular2-notifications';
import { ModalModule } from 'ng2-bootstrap/modal';
2016-11-20 10:18:15 -06:00
import { AuthService } from './auth';
import { ConfirmComponent, ConfirmService } from './confirm';
2017-01-23 15:32:43 -06:00
import { MenuComponent, MenuAdminComponent } from './menu';
2016-11-20 10:18:15 -06:00
import { throwIfAlreadyLoaded } from './module-import-guard';
@NgModule({
imports: [
CommonModule,
HttpModule,
RouterModule,
ModalModule,
SimpleNotificationsModule.forRoot()
2016-11-20 10:18:15 -06:00
],
2017-01-23 15:32:43 -06:00
declarations: [
ConfirmComponent,
2017-01-23 15:32:43 -06:00
MenuComponent,
MenuAdminComponent
],
2017-01-23 15:32:43 -06:00
exports: [
SimpleNotificationsModule,
ConfirmComponent,
2017-01-23 15:32:43 -06:00
MenuComponent,
MenuAdminComponent
],
providers: [
AuthService,
ConfirmService
]
2016-11-20 10:18:15 -06:00
})
export class CoreModule {
constructor( @Optional() @SkipSelf() parentModule: CoreModule) {
throwIfAlreadyLoaded(parentModule, 'CoreModule');
}
}