2017-06-16 07:32:15 -05:00
|
|
|
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 13:28:12 -05:00
|
|
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
|
2016-11-20 10:18:15 -06:00
|
|
|
|
2017-06-16 07:32:15 -05:00
|
|
|
import { SimpleNotificationsModule } from 'angular2-notifications'
|
|
|
|
import { ModalModule } from 'ngx-bootstrap/modal'
|
2017-01-27 09:14:11 -06:00
|
|
|
|
2017-10-27 09:55:03 -05:00
|
|
|
import { AuthService } from './auth'
|
|
|
|
import { LoginGuard, UserRightGuard } from './routing'
|
2017-10-09 12:12:40 -05:00
|
|
|
import { ServerService } from './server'
|
2017-06-16 07:32:15 -05:00
|
|
|
import { ConfirmComponent, ConfirmService } from './confirm'
|
|
|
|
import { throwIfAlreadyLoaded } from './module-import-guard'
|
2016-11-20 10:18:15 -06:00
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
imports: [
|
|
|
|
CommonModule,
|
2016-11-29 14:41:11 -06:00
|
|
|
HttpModule,
|
2017-01-27 09:14:11 -06:00
|
|
|
RouterModule,
|
2017-08-28 13:28:12 -05:00
|
|
|
BrowserAnimationsModule,
|
2017-01-27 09:14:11 -06:00
|
|
|
|
2017-01-27 09:54:44 -06:00
|
|
|
ModalModule,
|
2017-02-05 03:26:22 -06:00
|
|
|
SimpleNotificationsModule.forRoot()
|
2016-11-20 10:18:15 -06:00
|
|
|
],
|
2017-01-27 09:54:44 -06:00
|
|
|
|
2017-01-23 15:32:43 -06:00
|
|
|
declarations: [
|
2017-12-01 02:20:19 -06:00
|
|
|
ConfirmComponent
|
2017-01-23 15:32:43 -06:00
|
|
|
],
|
2017-01-27 09:54:44 -06:00
|
|
|
|
2017-01-23 15:32:43 -06:00
|
|
|
exports: [
|
2017-01-27 09:14:11 -06:00
|
|
|
SimpleNotificationsModule,
|
|
|
|
|
2017-12-01 02:20:19 -06:00
|
|
|
ConfirmComponent
|
2017-01-23 15:32:43 -06:00
|
|
|
],
|
2017-01-27 09:54:44 -06:00
|
|
|
|
|
|
|
providers: [
|
|
|
|
AuthService,
|
2017-04-04 14:37:03 -05:00
|
|
|
ConfirmService,
|
2017-10-10 03:18:25 -05:00
|
|
|
ServerService,
|
2017-10-27 09:55:03 -05:00
|
|
|
LoginGuard,
|
|
|
|
UserRightGuard
|
2017-01-27 09:54:44 -06:00
|
|
|
]
|
2016-11-20 10:18:15 -06:00
|
|
|
})
|
|
|
|
export class CoreModule {
|
2017-10-31 10:37:37 -05:00
|
|
|
constructor (@Optional() @SkipSelf() parentModule: CoreModule) {
|
2017-06-16 07:32:15 -05:00
|
|
|
throwIfAlreadyLoaded(parentModule, 'CoreModule')
|
2016-11-20 10:18:15 -06:00
|
|
|
}
|
|
|
|
}
|