Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit c08f055

Browse files
committed
♻️ refactoring des modules
1 parent d57f961 commit c08f055

File tree

2 files changed

+22
-13
lines changed

2 files changed

+22
-13
lines changed

src/app/shared/shared.module.ts

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,23 @@ import { ThemeModule } from './themes/theme.module';
77
import { OverlapingLabelComponent } from './components/inputs/overlaping-label/overlaping-label.component';
88
import { PrimaryComponent as ButtonPrimary } from './components/buttons/primary/primary.component';
99

10+
11+
const MODULES = [CommonModule, ThemeModule];
12+
const DECLARATIONS = [
13+
ButtonPrimary,
14+
OverlapingLabelComponent,
15+
];
16+
1017
@NgModule({
11-
declarations: [
12-
OverlapingLabelComponent,
13-
ButtonPrimary,
14-
],
18+
declarations: DECLARATIONS,
1519
imports: [
16-
CommonModule,
17-
ThemeModule,
1820
FormsModule,
1921
ReactiveFormsModule,
22+
...MODULES
2023
],
21-
exports: [
22-
CommonModule,
23-
ThemeModule,
24-
OverlapingLabelComponent,
25-
ButtonPrimary,
24+
exports: [
25+
...DECLARATIONS,
26+
...MODULES
2627
],
2728
})
2829
export class SharedModule { }

src/app/shared/themes/theme.module.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,22 @@ import { CpanelComponent } from './layouts/cpanel/cpanel.component';
77
import { SidebarComponent } from './components/sidebar/sidebar.component';
88
import { LogoComponent } from './components/logo/logo.component';
99

10+
const MODULES = [
11+
CommonModule,
12+
RouterModule
13+
];
14+
1015
@NgModule({
1116
declarations: [
1217
AuthComponent,
1318
CpanelComponent,
1419
SidebarComponent,
1520
LogoComponent,
1621
],
17-
imports: [CommonModule, RouterModule],
18-
exports: [RouterModule, CommonModule, LogoComponent],
22+
imports: MODULES,
23+
exports: [
24+
LogoComponent,
25+
...MODULES,
26+
],
1927
})
2028
export class ThemeModule { }

0 commit comments

Comments
 (0)