redoc/lib/redoc.module.ts

48 lines
1.4 KiB
TypeScript
Raw Normal View History

2016-12-13 09:10:18 +03:00
import { NgModule, ErrorHandler, APP_ID } from '@angular/core';
2016-10-18 23:39:43 +03:00
import { CommonModule } from '@angular/common';
2016-08-22 12:12:13 +03:00
2017-03-30 15:17:08 +03:00
import { Redoc, SecurityDefinitions, Operation, REDOC_DIRECTIVES } from './components/index';
2016-10-30 18:58:06 +03:00
import { REDOC_COMMON_DIRECTIVES, DynamicNg2Wrapper } from './shared/components/index';
2016-12-02 12:59:29 +03:00
import { REDOC_PIPES } from './utils/pipes';
2016-10-23 20:18:42 +03:00
import { CustomErrorHandler } from './utils/'
2016-11-23 02:23:32 +03:00
import { LazyTasksService } from './shared/components/LazyFor/lazy-for';
2016-08-22 12:12:13 +03:00
2016-10-30 18:58:06 +03:00
import {
OptionsService,
MenuService,
ScrollService,
Hash,
WarningsService,
AppStateService,
ComponentParser,
ContentProjector,
2016-12-29 20:20:29 +03:00
Marker,
SearchService,
2016-10-30 18:58:06 +03:00
COMPONENT_PARSER_ALLOWED } from './services/';
2017-03-15 18:50:10 +03:00
2016-10-23 20:18:42 +03:00
import { SpecManager } from './utils/spec-manager';
2016-08-22 12:12:13 +03:00
@NgModule({
2016-10-18 23:39:43 +03:00
imports: [ CommonModule ],
2016-10-30 18:58:06 +03:00
declarations: [ REDOC_DIRECTIVES, REDOC_COMMON_DIRECTIVES, REDOC_PIPES ],
2016-08-22 12:12:13 +03:00
bootstrap: [ Redoc ],
2017-03-30 15:17:08 +03:00
entryComponents: [ SecurityDefinitions, DynamicNg2Wrapper, Operation ],
2016-08-22 12:12:13 +03:00
providers: [
ScrollService,
Hash,
WarningsService,
2016-10-23 20:18:42 +03:00
OptionsService,
AppStateService,
2016-10-30 18:58:06 +03:00
ComponentParser,
ContentProjector,
2016-12-13 09:10:18 +03:00
{ provide: APP_ID, useValue: 'redoc' },
2016-10-30 18:58:06 +03:00
{ provide: ErrorHandler, useClass: CustomErrorHandler },
{ provide: COMPONENT_PARSER_ALLOWED, useValue: { 'security-definitions': SecurityDefinitions} }
2016-10-14 11:44:18 +03:00
],
exports: [Redoc]
2016-08-22 12:12:13 +03:00
})
export class RedocModule {
}
2016-10-14 11:44:18 +03:00
export { Redoc, SpecManager };