Skip to content

Commit 27e80ae

Browse files
committed
Convert all components, directives and pipes to standalone
1 parent 63ab02c commit 27e80ae

File tree

9 files changed

+51
-67
lines changed

9 files changed

+51
-67
lines changed

angular/src/account/account.module.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ import { TenantChangeDialogComponent } from './tenant/tenant-change-dialog.compo
2727
SharedModule,
2828
ServiceProxyModule,
2929
AccountRoutingModule,
30-
ModalModule.forChild()
31-
],
32-
declarations: [
30+
ModalModule.forChild(),
3331
AccountComponent,
3432
LoginComponent,
3533
RegisterComponent,
@@ -38,7 +36,7 @@ import { TenantChangeDialogComponent } from './tenant/tenant-change-dialog.compo
3836
AccountFooterComponent,
3937
// tenant
4038
TenantChangeComponent,
41-
TenantChangeDialogComponent,
39+
TenantChangeDialogComponent
4240
]
4341
})
4442
export class AccountModule {

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

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

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

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

Lines changed: 30 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,7 @@ import { SidebarMenuComponent } from "./layout/sidebar-menu.component";
3333
describe("AppComponent", () => {
3434
beforeEach(() => {
3535
TestBed.configureTestingModule({
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: [
36+
imports: [
5337
BrowserAnimationsModule,
5438
CommonModule,
5539
FormsModule,
@@ -64,27 +48,40 @@ describe("AppComponent", () => {
6448
ServiceProxyModule,
6549
SharedModule.forRoot(),
6650
NgxPaginationModule,
67-
],
68-
providers: [
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: [
6966
LayoutStoreService,
7067
{
71-
provide: AppSessionService,
72-
useValue: {
73-
application: {
74-
version: "",
75-
releaseDate: {
76-
format: function () {
77-
return "";
68+
provide: AppSessionService,
69+
useValue: {
70+
application: {
71+
version: "",
72+
releaseDate: {
73+
format: function () {
74+
return "";
75+
},
76+
},
7877
},
79-
},
78+
getShownLoginName: function () {
79+
return 'admin';
80+
}
8081
},
81-
getShownLoginName: function(){
82-
return 'admin';
83-
}
84-
},
8582
},
86-
],
87-
});
83+
],
84+
});
8885
TestBed.compileComponents();
8986
});
9087

angular/src/app/app.module.ts

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,6 @@ 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-
],
4027
imports: [
4128
AppRoutingModule,
4229
CommonModule,
@@ -50,7 +37,18 @@ import { SidebarMenuComponent } from './layout/sidebar-menu.component';
5037
TabsModule,
5138
ServiceProxyModule,
5239
NgxPaginationModule,
53-
SharedModule
40+
SharedModule,
41+
AppComponent,
42+
// layout
43+
HeaderComponent,
44+
HeaderLeftNavbarComponent,
45+
HeaderLanguageMenuComponent,
46+
HeaderUserMenuComponent,
47+
FooterComponent,
48+
SidebarComponent,
49+
SidebarLogoComponent,
50+
SidebarUserPanelComponent,
51+
SidebarMenuComponent
5452
],
5553
providers: []
5654
})

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

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

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

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

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

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

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

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

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

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

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

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

angular/src/shared/shared.module.ts

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

0 commit comments

Comments
 (0)