2017-03-26 13:32:29 -07:00
|
|
|
import { NgModule } from '@angular/core';
|
|
|
|
import { CommonModule } from '@angular/common';
|
|
|
|
|
2017-03-30 16:51:51 -07:00
|
|
|
import { ContributorService } from './contributor/contributor.service';
|
2017-03-26 13:32:29 -07:00
|
|
|
import { CopierService } from 'app/shared/copier.service';
|
2017-03-30 16:51:51 -07:00
|
|
|
import { PrettyPrinter } from './code/pretty-printer.service';
|
2017-03-26 13:32:29 -07:00
|
|
|
|
|
|
|
// Any components that we want to use inside embedded components must be declared or imported here
|
|
|
|
// It is not enough just to import them inside the AppModule
|
|
|
|
|
|
|
|
// Reusable components (used inside embedded components)
|
2017-05-16 16:10:06 -07:00
|
|
|
import { MdIconModule, MdTabsModule } from '@angular/material';
|
2017-03-26 13:32:29 -07:00
|
|
|
import { CodeComponent } from './code/code.component';
|
|
|
|
|
|
|
|
// Embedded Components
|
|
|
|
import { ApiListComponent } from './api/api-list.component';
|
|
|
|
import { CodeExampleComponent } from './code/code-example.component';
|
|
|
|
import { CodeTabsComponent } from './code/code-tabs.component';
|
2017-03-30 16:51:51 -07:00
|
|
|
import { ContributorListComponent } from './contributor/contributor-list.component';
|
|
|
|
import { ContributorComponent } from './contributor/contributor.component';
|
2017-04-20 14:45:56 +01:00
|
|
|
import { CurrentLocationComponent } from './current-location.component';
|
2017-03-28 14:41:50 -07:00
|
|
|
import { LiveExampleComponent, EmbeddedPlunkerComponent } from './live-example/live-example.component';
|
2017-04-14 17:53:49 -07:00
|
|
|
import { ResourceListComponent } from './resource/resource-list.component';
|
|
|
|
import { ResourceService } from './resource/resource.service';
|
2017-04-27 15:32:46 -07:00
|
|
|
import { TocComponent } from './toc/toc.component';
|
2017-03-26 13:32:29 -07:00
|
|
|
|
|
|
|
/** Components that can be embedded in docs
|
|
|
|
* such as CodeExampleComponent, LiveExampleComponent,...
|
|
|
|
*/
|
|
|
|
export const embeddedComponents: any[] = [
|
2017-04-20 14:45:56 +01:00
|
|
|
ApiListComponent, CodeExampleComponent, CodeTabsComponent, ContributorListComponent,
|
2017-04-27 15:32:46 -07:00
|
|
|
CurrentLocationComponent, LiveExampleComponent, ResourceListComponent, TocComponent
|
2017-03-26 13:32:29 -07:00
|
|
|
];
|
|
|
|
|
|
|
|
/** Injectable class w/ property returning components that can be embedded in docs */
|
|
|
|
export class EmbeddedComponents {
|
|
|
|
components = embeddedComponents;
|
|
|
|
}
|
|
|
|
|
|
|
|
@NgModule({
|
2017-05-16 16:10:06 -07:00
|
|
|
imports: [
|
|
|
|
CommonModule,
|
|
|
|
MdIconModule,
|
|
|
|
MdTabsModule
|
|
|
|
],
|
2017-03-26 13:32:29 -07:00
|
|
|
declarations: [
|
|
|
|
embeddedComponents,
|
2017-03-28 14:41:50 -07:00
|
|
|
CodeComponent,
|
2017-03-30 16:51:51 -07:00
|
|
|
ContributorComponent,
|
2017-03-28 14:41:50 -07:00
|
|
|
EmbeddedPlunkerComponent
|
2017-03-26 13:32:29 -07:00
|
|
|
],
|
2017-05-02 10:13:10 -07:00
|
|
|
exports: [
|
|
|
|
TocComponent
|
|
|
|
],
|
2017-03-26 13:32:29 -07:00
|
|
|
providers: [
|
2017-03-30 16:51:51 -07:00
|
|
|
ContributorService,
|
|
|
|
CopierService,
|
2017-03-26 13:32:29 -07:00
|
|
|
EmbeddedComponents,
|
2017-04-14 17:53:49 -07:00
|
|
|
PrettyPrinter,
|
|
|
|
ResourceService
|
2017-03-26 13:32:29 -07:00
|
|
|
],
|
|
|
|
entryComponents: [ embeddedComponents ]
|
|
|
|
})
|
|
|
|
export class EmbeddedModule { }
|