2018-01-23 11:07:39 +01:00
|
|
|
import { NgModule, ModuleWithProviders } from '@angular/core';
|
|
|
|
import { CommonModule } from '@angular/common';
|
|
|
|
import { RouterModule } from '@angular/router';
|
|
|
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
|
|
|
|
|
|
|
|
|
|
const MODULES = [
|
|
|
|
// Do NOT include UniversalModule, HttpModule, or JsonpModule here
|
|
|
|
CommonModule,
|
|
|
|
RouterModule,
|
|
|
|
FormsModule,
|
|
|
|
ReactiveFormsModule
|
|
|
|
];
|
|
|
|
|
|
|
|
const PIPES = [
|
|
|
|
// put pipes here
|
|
|
|
];
|
|
|
|
|
|
|
|
const COMPONENTS = [
|
|
|
|
// put shared components here
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
imports: [
|
|
|
|
...MODULES
|
|
|
|
],
|
|
|
|
declarations: [
|
|
|
|
...PIPES,
|
|
|
|
...COMPONENTS
|
|
|
|
],
|
|
|
|
exports: [
|
|
|
|
...MODULES,
|
|
|
|
...PIPES,
|
|
|
|
...COMPONENTS
|
|
|
|
]
|
|
|
|
})
|
|
|
|
export class SharedModule {
|
2021-07-14 17:41:12 +02:00
|
|
|
static forRoot(): ModuleWithProviders<SharedModule> {
|
2018-01-23 11:07:39 +01:00
|
|
|
return {
|
|
|
|
ngModule: SharedModule,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|