From 221fd7bf7b295f01c37f7f7cf2173725ac8696ae Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Tue, 18 Oct 2016 23:39:43 +0300 Subject: [PATCH] separate RedocModule from AppModule --- lib/app.module.ts | 13 +++++++++++++ lib/bootstrap.dev.ts | 4 ++-- lib/bootstrap.ts | 4 ++-- lib/redoc.module.ts | 4 ++-- 4 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 lib/app.module.ts diff --git a/lib/app.module.ts b/lib/app.module.ts new file mode 100644 index 00000000..37ee2c5a --- /dev/null +++ b/lib/app.module.ts @@ -0,0 +1,13 @@ +import { NgModule } from '@angular/core'; +import { BrowserModule } from '@angular/platform-browser'; + +import { RedocModule } from './redoc.module'; +import { Redoc } from './components/index'; + +@NgModule({ + imports: [ BrowserModule, RedocModule ], + bootstrap: [ Redoc ], + exports: [ Redoc ] +}) +export class AppModule { +} diff --git a/lib/bootstrap.dev.ts b/lib/bootstrap.dev.ts index f826b733..296618d7 100644 --- a/lib/bootstrap.dev.ts +++ b/lib/bootstrap.dev.ts @@ -1,6 +1,6 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { RedocModule } from './redoc.module'; +import { AppModule } from './app.module'; export function bootstrapRedoc() { - return platformBrowserDynamic().bootstrapModule(RedocModule); + return platformBrowserDynamic().bootstrapModule(AppModule); } diff --git a/lib/bootstrap.ts b/lib/bootstrap.ts index d7439b26..c55ccecb 100644 --- a/lib/bootstrap.ts +++ b/lib/bootstrap.ts @@ -1,6 +1,6 @@ import { platformBrowser } from '@angular/platform-browser'; -import { RedocModuleNgFactory } from './redoc.module.ngfactory'; +import { AppModuleNgFactory } from './app.module.ngfactory'; export function bootstrapRedoc() { - return platformBrowser().bootstrapModuleFactory(RedocModuleNgFactory); + return platformBrowser().bootstrapModuleFactory(AppModuleNgFactory); } diff --git a/lib/redoc.module.ts b/lib/redoc.module.ts index 98f15729..a29e0951 100644 --- a/lib/redoc.module.ts +++ b/lib/redoc.module.ts @@ -1,5 +1,5 @@ import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; +import { CommonModule } from '@angular/common'; import { Redoc, REDOC_DIRECTIVES } from './components/index'; import { REDOC_COMMON_DIRECTIVES } from './shared/components/index'; @@ -10,7 +10,7 @@ import { OptionsService, RedocEventsService, MenuService, import { SpecManager } from './utils/SpecManager'; @NgModule({ - imports: [ BrowserModule ], + imports: [ CommonModule ], declarations: [ REDOC_DIRECTIVES, REDOC_COMMON_DIRECTIVES, REDOC_PIPES], bootstrap: [ Redoc ], providers: [