Client: split in angular modules
[oweals/peertube.git] / client / src / app / core / core.module.ts
1 import { NgModule, Optional, SkipSelf } from '@angular/core';
2 import { CommonModule } from '@angular/common';
3 import { HttpModule } from '@angular/http';
4
5 import { AuthService } from './auth';
6 import { throwIfAlreadyLoaded } from './module-import-guard';
7
8 @NgModule({
9   imports: [
10     CommonModule,
11     HttpModule
12   ],
13   declarations: [ ],
14   exports: [ ],
15   providers: [ AuthService ]
16 })
17 export class CoreModule {
18    constructor( @Optional() @SkipSelf() parentModule: CoreModule) {
19     throwIfAlreadyLoaded(parentModule, 'CoreModule');
20   }
21 }