accountant-ui/src/scheduler/schedule.module.ts

60 lines
1.5 KiB
TypeScript
Raw Normal View History

2017-07-22 11:12:30 +02:00
// vim: set tw=80 ts=2 sw=2 sts=2 :
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { RestangularModule } from 'ngx-restangular';
2017-07-22 11:12:30 +02:00
import { NgLoggerModule, Level } from '@nsalaun/ng-logger';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { ToastrModule } from 'ngx-toastr';
import { ScheduleService } from './schedule.service';
import { ScheduleDeleteModalComponent } from './scheduleDeleteModal.component';
import { ScheduleRowComponent } from './scheduleRow.component';
import { ScheduleComponent } from './schedule.component';
2017-07-22 11:12:30 +02:00
export function $modalServiceFactory(i: any) {
return i.get('$modal');
}
export function accountIdServiceFactory(i: any) {
return i.get('accountIdService');
}
2017-07-22 11:12:30 +02:00
@NgModule({
imports: [
HttpModule,
CommonModule,
FormsModule,
NgLoggerModule,
RestangularModule,
2017-07-22 11:12:30 +02:00
ToastrModule,
NgbModule
],
providers: [
ScheduleService,
{
provide: '$modal',
deps: ['$injector'],
useFactory: $modalServiceFactory
}, {
provide: 'accountIdService',
deps: ['$injector'],
useFactory: accountIdServiceFactory
}
2017-07-22 11:12:30 +02:00
],
declarations: [
ScheduleDeleteModalComponent,
ScheduleComponent,
ScheduleRowComponent
2017-07-22 11:12:30 +02:00
],
entryComponents: [
ScheduleDeleteModalComponent,
ScheduleComponent,
ScheduleRowComponent
2017-07-22 11:12:30 +02:00
]
})
export class ScheduleModule {}