Skip to content

Commit c50d244

Browse files
committed
resolved #5272: Upgraded to Angular 9
1 parent c4a50b1 commit c50d244

15 files changed

+1913
-1038
lines changed

angular/angular.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"build": {
1212
"builder": "@angular-devkit/build-angular:browser",
1313
"options": {
14+
"aot": true,
1415
"outputPath": "dist",
1516
"index": "src/index.html",
1617
"main": "src/main.ts",
@@ -58,6 +59,12 @@
5859
},
5960
"configurations": {
6061
"production": {
62+
"budgets": [
63+
{
64+
"type": "anyComponentStyle",
65+
"maximumWarning": "6kb"
66+
}
67+
],
6168
"optimization": true,
6269
"outputHashing": "all",
6370
"sourceMap": false,
@@ -75,6 +82,12 @@
7582
]
7683
},
7784
"hmr": {
85+
"budgets": [
86+
{
87+
"type": "anyComponentStyle",
88+
"maximumWarning": "6kb"
89+
}
90+
],
7891
"fileReplacements": [
7992
{
8093
"replace": "src/environments/environment.ts",
@@ -190,7 +203,7 @@
190203
"schematics": {
191204
"@schematics/angular:component": {
192205
"prefix": "app",
193-
"styleext": "css"
206+
"style": "css"
194207
},
195208
"@schematics/angular:directive": {
196209
"prefix": "app"

angular/package.json

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,63 +13,64 @@
1313
"test": "ng test"
1414
},
1515
"dependencies": {
16-
"@angular/animations": "^8.2.4",
17-
"@angular/common": "^8.2.4",
18-
"@angular/compiler": "^8.2.4",
19-
"@angular/core": "^8.2.4",
20-
"@angular/forms": "^8.2.4",
21-
"@angular/platform-browser": "^8.2.4",
22-
"@angular/platform-browser-dynamic": "^8.2.4",
23-
"@angular/router": "^8.2.4",
16+
"@angular/animations": "^9.1.4",
17+
"@angular/common": "^9.1.4",
18+
"@angular/compiler": "^9.1.4",
19+
"@angular/core": "^9.1.4",
20+
"@angular/forms": "^9.1.4",
21+
"@angular/platform-browser": "^9.1.4",
22+
"@angular/platform-browser-dynamic": "^9.1.4",
23+
"@angular/router": "^9.1.4",
2424
"@aspnet/signalr": "^1.1.4",
2525
"@fortawesome/fontawesome-free": "^5.13.0",
26-
"abp-ng2-module": "^5.1.1",
26+
"abp-ng2-module": "^6.0.0",
2727
"abp-web-resources": "^5.1.1",
2828
"admin-lte-css-only": "^3.0.4",
2929
"block-ui": "^2.70.1",
3030
"core-js": "^3.2.1",
3131
"famfamfam-flags": "^1.0.0",
3232
"jquery": "^3.4.1",
3333
"lodash": "^4.17.4",
34-
"moment": "^2.18.1",
35-
"moment-timezone": "^0.5.13",
34+
"moment": "2.24.0",
35+
"moment-timezone": "^0.5.28",
3636
"ngx-bootstrap": "^5.6.1",
37-
"ngx-pagination": "^4.1.0",
38-
"push.js": "1.0.9",
37+
"ngx-pagination": "^5.0.0",
38+
"push.js": "1.0.12",
3939
"rxjs": "^6.4.0",
4040
"spin.js": "^2.3.2",
4141
"sweetalert": "^2.0.8",
4242
"toastr": "^2.1.2",
4343
"ts-helpers": "^1.1.2",
44+
"tslib": "^1.10.0",
4445
"web-animations-js": "^2.3.2",
45-
"zone.js": "~0.9.1"
46+
"zone.js": "~0.10.2"
4647
},
4748
"devDependencies": {
48-
"@angular-devkit/build-angular": "~0.803.2",
49-
"@angular/cli": "^8.3.2",
50-
"@angular/compiler-cli": "^8.2.4",
49+
"@angular-devkit/build-angular": "~0.901.4",
50+
"@angular/cli": "^9.1.4",
51+
"@angular/compiler-cli": "^9.1.4",
5152
"@angularclass/hmr": "^2.1.3",
5253
"@types/jasmine": "^3.4.0",
53-
"@types/jquery": "^3.3.34",
54+
"@types/jquery": "^3.3.37",
5455
"@types/jquery.blockui": "0.0.28",
55-
"@types/lodash": "^4.14.62",
56+
"@types/lodash": "^4.14.150",
5657
"@types/moment-timezone": "^0.5.12",
57-
"@types/node": "^12.7.3",
58-
"codelyzer": "^5.0.1",
58+
"@types/node": "^13.13.4",
59+
"codelyzer": "^5.1.2",
5960
"jasmine-core": "^3.3.0",
60-
"jasmine-spec-reporter": "^4.2.1",
61-
"karma": "^4.3.0",
61+
"jasmine-spec-reporter": "^5.0.2",
62+
"karma": "^5.0.4",
6263
"karma-chrome-launcher": "^3.1.0",
6364
"karma-cli": "^2.0.0",
64-
"karma-coverage-istanbul-reporter": "^2.0.4",
65-
"karma-jasmine": "^2.0.1",
65+
"karma-coverage-istanbul-reporter": "^3.0.0",
66+
"karma-jasmine": "^3.1.1",
6667
"karma-jasmine-html-reporter": "^1.4.0",
67-
"nswag": "^13.0.6",
68-
"protractor": "^5.1.1",
69-
"ts-node": "^8.3.0",
70-
"tslint": "^5.19.0",
71-
"typescript": "3.4.5",
72-
"webpack-bundle-analyzer": "^3.0.3"
68+
"nswag": "^13.4.2",
69+
"protractor": "^5.4.4",
70+
"ts-node": "^8.10.1",
71+
"tslint": "^6.1.2",
72+
"typescript": "3.8.3",
73+
"webpack-bundle-analyzer": "^3.7.0"
7374
},
7475
"angular-cli": {}
75-
}
76+
}

angular/src/account/account.module.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,10 @@ import { NgModule } from '@angular/core';
33
import { FormsModule } from '@angular/forms';
44
import { HttpClientJsonpModule } from '@angular/common/http';
55
import { HttpClientModule } from '@angular/common/http';
6-
76
import { ModalModule } from 'ngx-bootstrap/modal';
8-
9-
import { AbpModule } from '@abp/abp.module';
10-
117
import { AccountRoutingModule } from './account-routing.module';
12-
138
import { ServiceProxyModule } from '@shared/service-proxies/service-proxy.module';
14-
159
import { SharedModule } from '@shared/shared.module';
16-
1710
import { AccountComponent } from './account.component';
1811
import { LoginComponent } from './login/login.component';
1912
import { RegisterComponent } from './register/register.component';
@@ -31,7 +24,6 @@ import { TenantChangeDialogComponent } from './tenant/tenant-change-dialog.compo
3124
FormsModule,
3225
HttpClientModule,
3326
HttpClientJsonpModule,
34-
AbpModule,
3527
SharedModule,
3628
ServiceProxyModule,
3729
AccountRoutingModule,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component, Injector } from '@angular/core';
2-
import { AbpSessionService } from '@abp/session/abp-session.service';
2+
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';

angular/src/app/app.module.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,15 @@ import { CommonModule } from '@angular/common';
33
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
44
import { HttpClientJsonpModule } from '@angular/common/http';
55
import { HttpClientModule } from '@angular/common/http';
6-
76
import { ModalModule } from 'ngx-bootstrap/modal';
87
import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
98
import { CollapseModule } from 'ngx-bootstrap/collapse';
109
import { TabsModule } from 'ngx-bootstrap/tabs';
1110
import { NgxPaginationModule } from 'ngx-pagination';
12-
1311
import { AppRoutingModule } from './app-routing.module';
1412
import { AppComponent } from './app.component';
15-
16-
import { AbpModule } from '@abp/abp.module';
17-
1813
import { ServiceProxyModule } from '@shared/service-proxies/service-proxy.module';
1914
import { SharedModule } from '@shared/shared.module';
20-
2115
import { HomeComponent } from '@app/home/home.component';
2216
import { AboutComponent } from '@app/about/about.component';
2317
// tenants
@@ -85,7 +79,6 @@ import { SidebarMenuComponent } from './layout/sidebar-menu.component';
8579
BsDropdownModule,
8680
CollapseModule,
8781
TabsModule,
88-
AbpModule,
8982
AppRoutingModule,
9083
ServiceProxyModule,
9184
SharedModule,

angular/src/root.module.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
33
import { NgModule, Injector, APP_INITIALIZER, LOCALE_ID } from '@angular/core';
44
import { PlatformLocation, registerLocaleData } from '@angular/common';
55

6-
import { AbpModule } from '@abp/abp.module';
7-
import { AbpHttpInterceptor } from '@abp/abpHttpInterceptor';
6+
import { AbpHttpInterceptor } from 'abp-ng2-module';
87
import { HTTP_INTERCEPTORS } from '@angular/common/http';
98

109
import { SharedModule } from '@shared/shared.module';
@@ -101,7 +100,6 @@ export function getCurrentLanguage(): string {
101100
BsDropdownModule.forRoot(),
102101
CollapseModule.forRoot(),
103102
TabsModule.forRoot(),
104-
AbpModule,
105103
ServiceProxyModule,
106104
RootRoutingModule,
107105
HttpClientModule

angular/src/shared/app-component-base.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
import { Injector, ElementRef } from '@angular/core';
22
import { AppConsts } from '@shared/AppConsts';
3-
import { LocalizationService } from '@abp/localization/localization.service';
4-
import { PermissionCheckerService } from '@abp/auth/permission-checker.service';
5-
import { FeatureCheckerService } from '@abp/features/feature-checker.service';
6-
import { NotifyService } from '@abp/notify/notify.service';
7-
import { SettingService } from '@abp/settings/setting.service';
8-
import { MessageService } from '@abp/message/message.service';
9-
import { AbpMultiTenancyService } from '@abp/multi-tenancy/abp-multi-tenancy.service';
3+
import {
4+
LocalizationService,
5+
PermissionCheckerService,
6+
FeatureCheckerService,
7+
NotifyService,
8+
SettingService,
9+
MessageService,
10+
AbpMultiTenancyService
11+
} from 'abp-ng2-module';
12+
1013
import { AppSessionService } from '@shared/session/app-session.service';
1114

1215
export abstract class AppComponentBase {

angular/src/shared/auth/app-auth.service.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import { Injectable } from '@angular/core';
22
import { Router } from '@angular/router';
33
import { finalize } from 'rxjs/operators';
4-
import { TokenService } from '@abp/auth/token.service';
5-
import { LogService } from '@abp/log/log.service';
6-
import { UtilsService } from '@abp/utils/utils.service';
4+
import { TokenService, LogService, UtilsService } from 'abp-ng2-module';
75
import { AppConsts } from '@shared/AppConsts';
86
import { UrlHelper } from '@shared/helpers/UrlHelper';
97
import {

angular/src/shared/auth/auth-route-guard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Injectable } from '@angular/core';
2-
import { PermissionCheckerService } from '@abp/auth/permission-checker.service';
2+
import { PermissionCheckerService } from 'abp-ng2-module';
33
import { AppSessionService } from '../session/app-session.service';
44

55
import {

angular/src/shared/helpers/SignalRAspNetCoreHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { AppConsts } from '@shared/AppConsts';
2-
import { UtilsService } from '@abp/utils/utils.service';
2+
import { UtilsService } from 'abp-ng2-module';
33

44
export class SignalRAspNetCoreHelper {
55
static initSignalR(callback?: () => void): void {

0 commit comments

Comments
 (0)