dependencies Legend  Declarations  Module  Bootstrap  Providers  Exports cluster_CoreModule cluster_CoreModule_imports SharedModule SharedModule CoreModule CoreModule SharedModule->CoreModule

File

src/client/app/modules/core/core.module.ts

Imports

import { NgModule, ModuleWithProviders, Optional, SkipSelf } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import { HttpModule } from '@angular/http';


import { SharedModule } from '../shared/index';
import { CORE_DIRECTIVES } from './directives/index';
import { CORE_PROVIDERS } from './services/index';
import { Config } from './utils/index';

interface ICoreModuleOptions {
  window?: any;
  console?: any;
}

@NgModule({
  imports: [
    SharedModule
  ],
  declarations: [
    ...CORE_DIRECTIVES
  ],
  exports: [
    ...CORE_DIRECTIVES
  ],
  providers: [
    ...CORE_PROVIDERS,
  ]
})
export class CoreModule {
  // configuredProviders: *required to configure WindowService and ConsoleService per platform
  static forRoot(configuredProviders: Array<any>): ModuleWithProviders {
    return {
      ngModule: CoreModule,
      providers: configuredProviders
    };
  }
  constructor(@Optional() @SkipSelf() parentModule: CoreModule) {
    if (parentModule) {
      throw new Error('CoreModule already loaded; Import in root module only.');
    }
  }
}

results matching ""

    No results matching ""