Skip to content

Commit 9b79531

Browse files
authored
Merge pull request #681 from aspnetboilerplate/feat/ng-standalone
Feat/ng standalone
2 parents 9f24de8 + 02c3536 commit 9b79531

File tree

64 files changed

+2168
-1939
lines changed

Some content is hidden

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

64 files changed

+2168
-1939
lines changed

angular/.browserslistrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@
99
last 2 versions
1010
Firefox ESR
1111
not dead
12-
not IE 9-11 # For IE 9-11 support, remove 'not'.
12+
not IE 9-11
13+
not kaios 2.5
14+
not op_mini all

angular/angular.json

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,16 @@
99
"projectType": "application",
1010
"architect": {
1111
"build": {
12-
"builder": "@angular-devkit/build-angular:browser",
12+
"builder": "@angular-devkit/build-angular:application",
1313
"options": {
14-
"outputPath": "dist",
14+
"outputPath": {
15+
"base": "dist"
16+
},
1517
"index": "src/index.html",
16-
"main": "src/main.ts",
1718
"tsConfig": "src/tsconfig.json",
18-
"polyfills": "src/polyfills.ts",
19+
"polyfills": [
20+
"src/polyfills.ts"
21+
],
1922
"assets": [
2023
"src/assets",
2124
"src/favicon.ico",
@@ -36,9 +39,7 @@
3639
"src/assets/freeze-ui/freeze-ui.css",
3740
"node_modules/@fortawesome/fontawesome-free/css/all.min.css",
3841
"node_modules/admin-lte-css-only/css/adminlte.min.css",
39-
"src/shared/core.less",
40-
"node_modules/primeng/resources/primeng.min.css",
41-
"node_modules/primeng/resources/themes/bootstrap4-light-blue/theme.css"
42+
"src/shared/core.less"
4243
],
4344
"scripts": [
4445
"node_modules/moment/min/moment.min.js",
@@ -51,12 +52,11 @@
5152
"src/assets/abp-web-resources/abp.freeze-ui.js",
5253
"node_modules/abp-web-resources/Abp/Framework/scripts/libs/abp.moment.js"
5354
],
54-
"vendorChunk": true,
5555
"extractLicenses": false,
56-
"buildOptimizer": false,
5756
"sourceMap": true,
5857
"optimization": false,
59-
"namedChunks": true
58+
"namedChunks": true,
59+
"browser": "src/main.ts"
6060
},
6161
"configurations": {
6262
"production": {
@@ -71,8 +71,6 @@
7171
"sourceMap": false,
7272
"namedChunks": false,
7373
"extractLicenses": true,
74-
"vendorChunk": false,
75-
"buildOptimizer": true,
7674
"fileReplacements": [
7775
{
7876
"replace": "src/environments/environment.ts",

angular/package.json

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,35 @@
66
"scripts": {
77
"pree2e": "webdriver-manager update --standalone false --gecko false",
88
"e2e": "protractor",
9-
"hmr": "ng serve --host 0.0.0.0 --port 4200 --hmr",
9+
"hmr": "ng serve --host 0.0.0.0 --port 4200",
1010
"lint": "tslint --force --project src/tsconfig.json src/**/*.ts -t verbose",
1111
"ng": "ng",
12-
"start": "ng serve --host 0.0.0.0 --port 4200",
12+
"start": "ng serve --host 0.0.0.0 --port 4200 --no-hmr",
1313
"test": "ng test"
1414
},
1515
"dependencies": {
16-
"@angular/animations": "^18.1.2",
17-
"@angular/common": "^18.1.2",
18-
"@angular/compiler": "^18.1.2",
19-
"@angular/core": "^18.1.2",
20-
"@angular/forms": "^18.1.2",
21-
"@angular/platform-browser": "^18.1.2",
22-
"@angular/platform-browser-dynamic": "^18.1.2",
23-
"@angular/router": "^18.1.2",
16+
"@angular/animations": "^19.2.1",
17+
"@angular/common": "^19.2.1",
18+
"@angular/compiler": "^19.2.1",
19+
"@angular/core": "^19.2.1",
20+
"@angular/forms": "^19.2.1",
21+
"@angular/platform-browser": "^19.2.1",
22+
"@angular/platform-browser-dynamic": "^19.2.1",
23+
"@angular/router": "^19.2.1",
2424
"@fortawesome/fontawesome-free": "^6.7.2",
2525
"@microsoft/signalr": "^8.0.7",
2626
"abp-ng2-module": "12.1.0",
2727
"abp-web-resources": "^6.1.0",
2828
"admin-lte-css-only": "^3.2.0",
29-
"core-js": "^3.40.0",
29+
"core-js": "^3.41.0",
3030
"famfamfam-flags": "^1.0.0",
3131
"lodash-es": "^4.17.21",
3232
"moment": "2.30.1",
3333
"moment-timezone": "0.5.47",
3434
"ngx-bootstrap": "^19.0.2",
3535
"ngx-pagination": "^6.0.3",
36-
"primeng": "^17.18.11",
36+
"primeng": "^19.0.9",
37+
"@primeng/themes": "^19.0.9",
3738
"push.js": "1.0.12",
3839
"rtl-detect": "^1.1.2",
3940
"rxjs": "^7.8.2",
@@ -42,14 +43,14 @@
4243
"tslib": "^2.8.1"
4344
},
4445
"devDependencies": {
45-
"@angular-devkit/build-angular": "^18.1.2",
46-
"@angular/cli": "^18.1.2",
47-
"@angular/compiler-cli": "^18.1.2",
46+
"@angular-devkit/build-angular": "^19.2.1",
47+
"@angular/cli": "^19.2.1",
48+
"@angular/compiler-cli": "^19.2.1",
4849
"@angularclass/hmr": "^3.0.0",
4950
"@types/jasmine": "~5.1.7",
5051
"@types/lodash-es": "^4.17.12",
5152
"@types/moment-timezone": "^0.5.30",
52-
"@types/node": "^22.13.5",
53+
"@types/node": "^22.13.10",
5354
"jasmine-core": "~5.6.0",
5455
"jasmine-spec-reporter": "~7.0.0",
5556
"karma": "~6.4.4",
@@ -62,7 +63,7 @@
6263
"protractor": "~7.0.0",
6364
"ts-node": "^10.9.2",
6465
"tslint": "~6.1.3",
65-
"typescript": "5.5.3",
66+
"typescript": "5.8.2",
6667
"webpack-bundle-analyzer": "^4.10.2"
6768
},
6869
"angular-cli": {}

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();

0 commit comments

Comments
 (0)