Skip to content

Commit 9b8ccb2

Browse files
committed
migrate to standalone components
1 parent 815a79a commit 9b8ccb2

File tree

54 files changed

+375
-242
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+375
-242
lines changed

angular/src/account/account.component.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,17 @@ import {
66
Renderer2
77
} from '@angular/core';
88
import { AppComponentBase } from '@shared/app-component-base';
9+
import { AccountHeaderComponent } from './layout/account-header.component';
10+
import { TenantChangeComponent } from './tenant/tenant-change.component';
11+
import { RouterOutlet } from '@angular/router';
12+
import { AccountLanguagesComponent } from './layout/account-languages.component';
13+
import { AccountFooterComponent } from './layout/account-footer.component';
914

1015
@Component({
11-
templateUrl: './account.component.html',
12-
encapsulation: ViewEncapsulation.None
16+
templateUrl: './account.component.html',
17+
encapsulation: ViewEncapsulation.None,
18+
standalone: true,
19+
imports: [AccountHeaderComponent, TenantChangeComponent, RouterOutlet, AccountLanguagesComponent, AccountFooterComponent]
1320
})
1421
export class AccountComponent extends AppComponentBase implements OnInit {
1522
constructor(injector: Injector, private renderer: Renderer2) {

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/account/layout/account-footer.component.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import { Component, Injector, ChangeDetectionStrategy } from '@angular/core';
22
import { AppComponentBase } from '@shared/app-component-base';
3+
import { LocalizePipe } from '@shared/pipes/localize.pipe';
34

45
@Component({
5-
selector: 'account-footer',
6-
templateUrl: './account-footer.component.html',
7-
changeDetection: ChangeDetectionStrategy.OnPush
6+
selector: 'account-footer',
7+
templateUrl: './account-footer.component.html',
8+
changeDetection: ChangeDetectionStrategy.OnPush,
9+
standalone: true,
10+
imports: [LocalizePipe]
811
})
912
export class AccountFooterComponent extends AppComponentBase {
1013
currentYear: number;
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { Component, ChangeDetectionStrategy } from '@angular/core';
22

33
@Component({
4-
selector: 'account-header',
5-
templateUrl: './account-header.component.html',
6-
changeDetection: ChangeDetectionStrategy.OnPush
4+
selector: 'account-header',
5+
templateUrl: './account-header.component.html',
6+
changeDetection: ChangeDetectionStrategy.OnPush,
7+
standalone: true
78
})
89
export class AccountHeaderComponent {}

angular/src/account/layout/account-languages.component.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ import { AppComponentBase } from '@shared/app-component-base';
88
import { filter as _filter } from 'lodash-es';
99

1010
@Component({
11-
selector: 'account-languages',
12-
templateUrl: './account-languages.component.html',
13-
changeDetection: ChangeDetectionStrategy.OnPush
11+
selector: 'account-languages',
12+
templateUrl: './account-languages.component.html',
13+
changeDetection: ChangeDetectionStrategy.OnPush,
14+
standalone: true
1415
})
1516
export class AccountLanguagesComponent extends AppComponentBase
1617
implements OnInit {

angular/src/account/login/login.component.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,16 @@ import { AbpSessionService } from 'abp-ng2-module';
33
import { AppComponentBase } from '@shared/app-component-base';
44
import { accountModuleAnimation } from '@shared/animations/routerTransition';
55
import { AppAuthService } from '@shared/auth/app-auth.service';
6+
import { FormsModule } from '@angular/forms';
7+
import { AbpValidationSummaryComponent } from '../../shared/components/validation/abp-validation.summary.component';
8+
import { RouterLink } from '@angular/router';
9+
import { LocalizePipe } from '@shared/pipes/localize.pipe';
610

711
@Component({
8-
templateUrl: './login.component.html',
9-
animations: [accountModuleAnimation()]
12+
templateUrl: './login.component.html',
13+
animations: [accountModuleAnimation()],
14+
standalone: true,
15+
imports: [FormsModule, AbpValidationSummaryComponent, RouterLink, LocalizePipe]
1016
})
1117
export class LoginComponent extends AppComponentBase {
1218
submitting = false;

angular/src/account/register/register.component.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component, Injector, Input } from '@angular/core';
2-
import { Router } from '@angular/router';
2+
import { Router, RouterLink } from '@angular/router';
33
import { finalize } from 'rxjs/operators';
44
import { AppComponentBase } from '@shared/app-component-base';
55
import {
@@ -9,10 +9,15 @@ import {
99
} from '@shared/service-proxies/service-proxies';
1010
import { accountModuleAnimation } from '@shared/animations/routerTransition';
1111
import { AppAuthService } from '@shared/auth/app-auth.service';
12+
import { FormsModule } from '@angular/forms';
13+
import { AbpValidationSummaryComponent } from '../../shared/components/validation/abp-validation.summary.component';
14+
import { LocalizePipe } from '@shared/pipes/localize.pipe';
1215

1316
@Component({
14-
templateUrl: './register.component.html',
15-
animations: [accountModuleAnimation()]
17+
templateUrl: './register.component.html',
18+
animations: [accountModuleAnimation()],
19+
standalone: true,
20+
imports: [FormsModule, AbpValidationSummaryComponent, RouterLink, LocalizePipe]
1621
})
1722
export class RegisterComponent extends AppComponentBase {
1823
model: RegisterInput = new RegisterInput();

angular/src/account/tenant/tenant-change-dialog.component.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,15 @@ import {
77
IsTenantAvailableInput,
88
IsTenantAvailableOutput
99
} from '@shared/service-proxies/service-proxies';
10+
import { FormsModule } from '@angular/forms';
11+
import { AbpModalHeaderComponent } from '../../shared/components/modal/abp-modal-header.component';
12+
import { AbpModalFooterComponent } from '../../shared/components/modal/abp-modal-footer.component';
13+
import { LocalizePipe } from '@shared/pipes/localize.pipe';
1014

1115
@Component({
12-
templateUrl: './tenant-change-dialog.component.html'
16+
templateUrl: './tenant-change-dialog.component.html',
17+
standalone: true,
18+
imports: [FormsModule, AbpModalHeaderComponent, AbpModalFooterComponent, LocalizePipe]
1319
})
1420
export class TenantChangeDialogComponent extends AppComponentBase {
1521
saving = false;

angular/src/account/tenant/tenant-change.component.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
import { AppComponentBase } from '@shared/app-component-base';
33
import { TenantChangeDialogComponent } from './tenant-change-dialog.component';
44
import { BsModalService } from 'ngx-bootstrap/modal';
5+
import { LocalizePipe } from '@shared/pipes/localize.pipe';
56

67
@Component({
7-
selector: 'tenant-change',
8-
templateUrl: './tenant-change.component.html'
8+
selector: 'tenant-change',
9+
templateUrl: './tenant-change.component.html',
10+
standalone: true,
11+
imports: [LocalizePipe]
912
})
1013
export class TenantChangeComponent extends AppComponentBase implements OnInit {
1114
tenancyName = '';

angular/src/app/about/about.component.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
import { Component, Injector, ChangeDetectionStrategy } from '@angular/core';
22
import { AppComponentBase } from '@shared/app-component-base';
33
import { appModuleAnimation } from '@shared/animations/routerTransition';
4+
import { LocalizePipe } from '@shared/pipes/localize.pipe';
45

56
@Component({
6-
templateUrl: './about.component.html',
7-
animations: [appModuleAnimation()],
8-
changeDetection: ChangeDetectionStrategy.OnPush
7+
templateUrl: './about.component.html',
8+
animations: [appModuleAnimation()],
9+
changeDetection: ChangeDetectionStrategy.OnPush,
10+
standalone: true,
11+
imports: [LocalizePipe]
912
})
1013
export class AboutComponent extends AppComponentBase {
1114
constructor(injector: Injector) {

0 commit comments

Comments
 (0)