ngx-admin/docs/app/@core/core.module.ts
Sergey Andrievskiy 165e64eaca feat: docs app
2019-10-08 16:17:13 +03:00

40 lines
919 B
TypeScript

/**
* @license
* Copyright Akveo. All Rights Reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*/
import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';
import { CommonModule } from '@angular/common';
import { throwIfAlreadyLoaded } from './module-import-guard';
import { DataModule } from './data/data.module';
const PIPES = [
];
const NB_CORE_PROVIDERS = [
...DataModule.forRoot().providers,
];
@NgModule({
imports: [
CommonModule,
],
exports: [...PIPES],
declarations: [...PIPES],
})
export class CoreModule {
constructor(@Optional() @SkipSelf() parentModule: CoreModule) {
throwIfAlreadyLoaded(parentModule, 'CoreModule');
}
static forRoot(): ModuleWithProviders {
return <ModuleWithProviders>{
ngModule: CoreModule,
providers: [
...NB_CORE_PROVIDERS,
],
};
}
}