redoc/lib/redoc.module.ts

45 lines
1.2 KiB
TypeScript
Raw Normal View History

2016-10-23 20:18:42 +03:00
import { NgModule, ErrorHandler } from '@angular/core';
2016-10-18 23:39:43 +03:00
import { CommonModule } from '@angular/common';
2016-08-22 12:12:13 +03:00
2016-10-23 20:18:42 +03:00
import { Redoc, SecurityDefinitions, REDOC_DIRECTIVES } from './components/index';
2016-10-30 18:58:06 +03:00
import { REDOC_COMMON_DIRECTIVES, DynamicNg2Wrapper } from './shared/components/index';
import { REDOC_PIPES, KeysPipe } from './utils/pipes';
2016-10-23 20:18:42 +03:00
import { CustomErrorHandler } from './utils/'
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,
COMPONENT_PARSER_ALLOWED } from './services/';
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 ],
2016-10-30 18:58:06 +03:00
entryComponents: [ SecurityDefinitions, DynamicNg2Wrapper ],
2016-08-22 12:12:13 +03:00
providers: [
SpecManager,
ScrollService,
Hash,
MenuService,
WarningsService,
2016-10-23 20:18:42 +03:00
OptionsService,
AppStateService,
2016-10-30 18:58:06 +03:00
ComponentParser,
ContentProjector,
{ 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 };