Skip to content

Commit 5e8d06c

Browse files
committed
upgraded to Angular 15
1 parent 51706ac commit 5e8d06c

File tree

10 files changed

+752
-1145
lines changed

10 files changed

+752
-1145
lines changed

angular/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,5 @@ testem.log
4242
#System Files
4343
.DS_Store
4444
Thumbs.db
45+
46+
.angular

angular/package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
"test": "ng test"
1414
},
1515
"dependencies": {
16-
"@angular/animations": "^14.2.12",
17-
"@angular/common": "^14.2.12",
18-
"@angular/compiler": "^14.2.12",
19-
"@angular/core": "^14.2.12",
20-
"@angular/forms": "^14.2.12",
21-
"@angular/platform-browser": "^14.2.12",
22-
"@angular/platform-browser-dynamic": "^14.2.12",
23-
"@angular/router": "^14.2.12",
16+
"@angular/animations": "^15.0.3",
17+
"@angular/common": "^15.0.3",
18+
"@angular/compiler": "^15.0.3",
19+
"@angular/core": "^15.0.3",
20+
"@angular/forms": "^15.0.3",
21+
"@angular/platform-browser": "^15.0.3",
22+
"@angular/platform-browser-dynamic": "^15.0.3",
23+
"@angular/router": "^15.0.3",
2424
"@aspnet/signalr": "^1.1.4",
2525
"@fortawesome/fontawesome-free": "^5.15.3",
2626
"abp-ng2-module": "7.2.0",
@@ -41,9 +41,9 @@
4141
"zone.js": "~0.11.4"
4242
},
4343
"devDependencies": {
44-
"@angular-devkit/build-angular": "^14.2.10",
45-
"@angular/cli": "^14.2.10",
46-
"@angular/compiler-cli": "^14.2.12",
44+
"@angular-devkit/build-angular": "^15.0.3",
45+
"@angular/cli": "^15.0.3",
46+
"@angular/compiler-cli": "^15.0.3",
4747
"@angularclass/hmr": "^2.1.3",
4848
"@types/jasmine": "~3.6.0",
4949
"@types/lodash-es": "^4.17.3",
@@ -62,7 +62,7 @@
6262
"protractor": "~7.0.0",
6363
"ts-node": "^8.10.1",
6464
"tslint": "~6.1.0",
65-
"typescript": "4.6.4",
65+
"typescript": "4.8.4",
6666
"webpack-bundle-analyzer": "^3.7.0"
6767
},
6868
"angular-cli": {}

angular/src/app-initializer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class AppInitializer {
3535
const angularLocale = this.convertAbpLocaleToAngularLocale(
3636
abp.localization.currentLanguage.name
3737
);
38-
import(`@angular/common/locales/${angularLocale}.js`).then(
38+
import(`/node_modules/@angular/common/locales/${angularLocale}.mjs`).then(
3939
(module) => {
4040
registerLocaleData(module.default);
4141
resolve(result);

angular/src/root-routing.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const routes: Routes = [
1616
];
1717

1818
@NgModule({
19-
imports: [RouterModule.forRoot(routes, { relativeLinkResolution: 'legacy' })],
19+
imports: [RouterModule.forRoot(routes)],
2020
exports: [RouterModule],
2121
providers: []
2222
})

angular/src/test.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import {
1414

1515
// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
1616
declare var __karma__: any;
17-
declare var require: any;
1817

1918
// Prevent Karma from running prematurely.
2019
__karma__.loaded = function () {};
@@ -26,9 +25,5 @@ getTestBed().initTestEnvironment(
2625
teardown: { destroyAfterEach: false }
2726
}
2827
);
29-
// Then we find all the tests.
30-
const context = require.context('./', true, /\.spec\.ts$/);
31-
// And load the modules.
32-
context.keys().map(context);
3328
// Finally, start Karma to run the tests.
3429
__karma__.start();

angular/src/tsconfig.app.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"files": ["main.ts", "polyfills.ts"],
4+
"include": ["src/**/*.d.ts", "typings.d.ts"]
5+
}

angular/src/tsconfig.json

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
"experimentalDecorators": true,
66
"lib": [ "es6", "dom" ],
77
"mapRoot": "./",
8-
"module": "es2020",
8+
"module": "esnext",
99
"skipLibCheck": true,
1010
"moduleResolution": "node",
1111
"outDir": "../dist/out-tsc",
1212
"sourceMap": true,
13-
"target": "es5",
13+
"target": "es2015",
1414
"typeRoots": [
1515
"../node_modules/@types"
1616
],
@@ -19,7 +19,8 @@
1919
"@abp/*": [ "../node_modules/abp-ng2-module/dist/src/*" ],
2020
"@app/*": [ "./app/*" ],
2121
"@shared/*": [ "./shared/*" ],
22-
"@node_modules/*": [ "../node_modules/*" ]
22+
"@node_modules/*": [ "../node_modules/*" ],
23+
"@angular/*": ["../node_modules/@angular/*"],
2324
}
2425
},
2526
"files": [
@@ -29,5 +30,15 @@
2930
"include": [
3031
"src/**/*.d.ts",
3132
"typings.d.ts"
32-
]
33+
],
34+
"angularCompilerOptions": {
35+
"fullTemplateTypeCheck": true,
36+
"strictTemplates": true,
37+
"strictInputTypes": false,
38+
"strictAttributeTypes": false,
39+
"strictOutputEventTypes": false,
40+
"strictDomEventTypes": false,
41+
"strictLiteralTypes": false,
42+
"strictInjectionParameters": false
43+
}
3344
}

angular/src/tsconfig.spec.json

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
{
2-
"extends": "./tsconfig.json",
3-
"compilerOptions": {
4-
"outDir": "./out-tsc/spec",
5-
"types": [
6-
"jasmine"
7-
]
8-
},
9-
"files": [
10-
"test.ts",
11-
"polyfills.ts"
12-
],
13-
"include": [
14-
"**/*.spec.ts",
15-
"**/*.d.ts"
16-
]
17-
}
2+
"extends": "./tsconfig.json",
3+
"files": ["test.ts", "polyfills.ts"],
4+
"include": ["src/**/*.d.ts", "typings.d.ts", "src/**/*.spec.ts", "**/*.spec.ts"]
5+
}

angular/tsconfig.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
This is a "Solution Style" tsconfig.json file, and is used by editors and TypeScript’s language server to improve development experience.
3+
It is not intended to be used to perform a compilation.
4+
To learn more about this file see: https://angular.io/config/solution-tsconfig.
5+
*/
6+
{
7+
"files": [],
8+
"references": [
9+
{
10+
"path": "./src/tsconfig.app.json"
11+
},
12+
{
13+
"path": "./src/tsconfig.spec.json"
14+
}
15+
],
16+
"include": ["src/**/*.ts"],
17+
}

0 commit comments

Comments
 (0)