1 |
57204
|
argiro.kok
|
import { NgModule, ModuleWithProviders } from '@angular/core';
|
2 |
|
|
import { CommonModule } from '@angular/common';
|
3 |
|
|
import { RouterModule } from '@angular/router';
|
4 |
|
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
5 |
|
|
|
6 |
|
|
|
7 |
|
|
const MODULES = [
|
8 |
|
|
// Do NOT include UniversalModule, HttpModule, or JsonpModule here
|
9 |
|
|
CommonModule,
|
10 |
|
|
RouterModule,
|
11 |
|
|
FormsModule,
|
12 |
|
|
ReactiveFormsModule
|
13 |
|
|
];
|
14 |
|
|
|
15 |
|
|
const PIPES = [
|
16 |
|
|
// put pipes here
|
17 |
|
|
];
|
18 |
|
|
|
19 |
|
|
const COMPONENTS = [
|
20 |
|
|
// put shared components here
|
21 |
|
|
];
|
22 |
|
|
|
23 |
|
|
|
24 |
|
|
|
25 |
|
|
@NgModule({
|
26 |
|
|
imports: [
|
27 |
|
|
...MODULES
|
28 |
|
|
],
|
29 |
|
|
declarations: [
|
30 |
|
|
...PIPES,
|
31 |
|
|
...COMPONENTS
|
32 |
|
|
],
|
33 |
|
|
exports: [
|
34 |
|
|
...MODULES,
|
35 |
|
|
...PIPES,
|
36 |
|
|
...COMPONENTS
|
37 |
|
|
]
|
38 |
|
|
})
|
39 |
|
|
export class SharedModule {
|
40 |
|
|
static forRoot(): ModuleWithProviders {
|
41 |
|
|
return {
|
42 |
|
|
ngModule: SharedModule,
|
43 |
|
|
};
|
44 |
|
|
}
|
45 |
|
|
}
|