Skip to content

Commit 5d7f9f7

Browse files
committed
Revert "Convert all components, directives and pipes to standalone"
This reverts commit 27e80ae.
1 parent cd066f2 commit 5d7f9f7

File tree

9 files changed

+67
-51
lines changed

9 files changed

+67
-51
lines changed

angular/src/account/account.module.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ import { TenantChangeDialogComponent } from './tenant/tenant-change-dialog.compo
2727
SharedModule,
2828
ServiceProxyModule,
2929
AccountRoutingModule,
30-
ModalModule.forChild(),
30+
ModalModule.forChild()
31+
],
32+
declarations: [
3133
AccountComponent,
3234
LoginComponent,
3335
RegisterComponent,
@@ -36,7 +38,7 @@ import { TenantChangeDialogComponent } from './tenant/tenant-change-dialog.compo
3638
AccountFooterComponent,
3739
// tenant
3840
TenantChangeComponent,
39-
TenantChangeDialogComponent
41+
TenantChangeDialogComponent,
4042
]
4143
})
4244
export class AccountModule {

angular/src/app/about/about.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { AboutRoutingModule } from './about-routing.module';
44
import { AboutComponent } from './about.component';
55

66
@NgModule({
7-
imports: [SharedModule, AboutRoutingModule, AboutComponent],
7+
declarations: [AboutComponent],
8+
imports: [SharedModule, AboutRoutingModule],
89
})
910
export class AboutModule {}

angular/src/app/app.component.spec.ts

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,23 @@ import { SidebarMenuComponent } from "./layout/sidebar-menu.component";
3333
describe("AppComponent", () => {
3434
beforeEach(() => {
3535
TestBed.configureTestingModule({
36-
imports: [
36+
declarations: [
37+
AppComponent,
38+
HomeComponent,
39+
AboutComponent,
40+
41+
// layout
42+
HeaderComponent,
43+
HeaderLeftNavbarComponent,
44+
HeaderLanguageMenuComponent,
45+
HeaderUserMenuComponent,
46+
FooterComponent,
47+
SidebarComponent,
48+
SidebarLogoComponent,
49+
SidebarUserPanelComponent,
50+
SidebarMenuComponent,
51+
],
52+
imports: [
3753
BrowserAnimationsModule,
3854
CommonModule,
3955
FormsModule,
@@ -48,40 +64,27 @@ describe("AppComponent", () => {
4864
ServiceProxyModule,
4965
SharedModule.forRoot(),
5066
NgxPaginationModule,
51-
AppComponent,
52-
HomeComponent,
53-
AboutComponent,
54-
// layout
55-
HeaderComponent,
56-
HeaderLeftNavbarComponent,
57-
HeaderLanguageMenuComponent,
58-
HeaderUserMenuComponent,
59-
FooterComponent,
60-
SidebarComponent,
61-
SidebarLogoComponent,
62-
SidebarUserPanelComponent,
63-
SidebarMenuComponent,
64-
],
65-
providers: [
67+
],
68+
providers: [
6669
LayoutStoreService,
6770
{
68-
provide: AppSessionService,
69-
useValue: {
70-
application: {
71-
version: "",
72-
releaseDate: {
73-
format: function () {
74-
return "";
75-
},
76-
},
71+
provide: AppSessionService,
72+
useValue: {
73+
application: {
74+
version: "",
75+
releaseDate: {
76+
format: function () {
77+
return "";
7778
},
78-
getShownLoginName: function () {
79-
return 'admin';
80-
}
79+
},
8180
},
81+
getShownLoginName: function(){
82+
return 'admin';
83+
}
84+
},
8285
},
83-
],
84-
});
86+
],
87+
});
8588
TestBed.compileComponents();
8689
});
8790

angular/src/app/app.module.ts

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,19 @@ import { SidebarUserPanelComponent } from './layout/sidebar-user-panel.component
2424
import { SidebarMenuComponent } from './layout/sidebar-menu.component';
2525

2626
@NgModule({
27+
declarations: [
28+
AppComponent,
29+
// layout
30+
HeaderComponent,
31+
HeaderLeftNavbarComponent,
32+
HeaderLanguageMenuComponent,
33+
HeaderUserMenuComponent,
34+
FooterComponent,
35+
SidebarComponent,
36+
SidebarLogoComponent,
37+
SidebarUserPanelComponent,
38+
SidebarMenuComponent
39+
],
2740
imports: [
2841
AppRoutingModule,
2942
CommonModule,
@@ -37,18 +50,7 @@ import { SidebarMenuComponent } from './layout/sidebar-menu.component';
3750
TabsModule,
3851
ServiceProxyModule,
3952
NgxPaginationModule,
40-
SharedModule,
41-
AppComponent,
42-
// layout
43-
HeaderComponent,
44-
HeaderLeftNavbarComponent,
45-
HeaderLanguageMenuComponent,
46-
HeaderUserMenuComponent,
47-
FooterComponent,
48-
SidebarComponent,
49-
SidebarLogoComponent,
50-
SidebarUserPanelComponent,
51-
SidebarMenuComponent
53+
SharedModule
5254
],
5355
providers: []
5456
})

angular/src/app/home/home.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { HomeRoutingModule } from './home-routing.module';
44
import { HomeComponent } from './home.component';
55

66
@NgModule({
7-
imports: [SharedModule, HomeRoutingModule, HomeComponent],
7+
declarations: [HomeComponent],
8+
imports: [SharedModule, HomeRoutingModule],
89
})
910
export class HomeModule {}

angular/src/app/roles/roles.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { EditRoleDialogComponent } from './edit-role/edit-role-dialog.component'
77
import { CommonModule } from '@angular/common';
88

99
@NgModule({
10-
imports: [SharedModule, RolesRoutingModule, CommonModule, RolesComponent, CreateRoleDialogComponent, EditRoleDialogComponent],
10+
declarations: [RolesComponent, CreateRoleDialogComponent, EditRoleDialogComponent],
11+
imports: [SharedModule, RolesRoutingModule, CommonModule],
1112
})
1213
export class RolesModule {}

angular/src/app/tenants/tenants.module.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ import { TenantsComponent } from './tenants.component';
77
import { CommonModule } from '@angular/common';
88

99
@NgModule({
10-
imports: [SharedModule, TenantsRoutingModule, CommonModule, CreateTenantDialogComponent,
10+
declarations: [
11+
CreateTenantDialogComponent,
1112
EditTenantDialogComponent,
12-
TenantsComponent],
13+
TenantsComponent,
14+
],
15+
imports: [SharedModule, TenantsRoutingModule, CommonModule],
1316
})
1417
export class TenantsModule {}

angular/src/app/users/users.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { UsersComponent } from './users.component';
99
import { CommonModule } from '@angular/common';
1010

1111
@NgModule({
12-
imports: [SharedModule, UsersRoutingModule, CommonModule, UsersComponent, ResetPasswordDialogComponent, EditUserDialogComponent, CreateUserDialogComponent, ChangePasswordComponent],
12+
declarations: [UsersComponent, ResetPasswordDialogComponent, EditUserDialogComponent, CreateUserDialogComponent, ChangePasswordComponent],
13+
imports: [SharedModule, UsersRoutingModule, CommonModule],
1314
})
1415
export class UsersModule {}

angular/src/shared/shared.module.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ import { ProgressBarModule } from 'primeng/progressbar';
4040
TableModule,
4141
PaginatorModule,
4242
ProgressBarModule,
43-
AutoCompleteModule,
43+
AutoCompleteModule
44+
],
45+
declarations: [
4446
AbpPaginationControlsComponent,
4547
AbpValidationSummaryComponent,
4648
AbpModalHeaderComponent,

0 commit comments

Comments
 (0)