Skip to content

Commit 61da693

Browse files
Merge pull request #305 from abpframework/updating-the-todo-applications
Angular - Updating TODO sample applications
2 parents d9bd4a8 + 7130bce commit 61da693

Some content is hidden

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

71 files changed

+15056
-25999
lines changed

TodoApp-SingleLayer/Angular-EfCore/angular/angular.json

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,15 @@
1919
"prefix": "app",
2020
"architect": {
2121
"build": {
22-
"builder": "@angular-devkit/build-angular:browser",
22+
"builder": "@angular/build:application",
2323
"options": {
24-
"outputPath": "dist/TodoApp",
24+
"outputPath": {
25+
"base": "dist/TodoApp"
26+
},
2527
"index": "src/index.html",
26-
"main": "src/main.ts",
27-
"polyfills": "src/polyfills.ts",
28+
"polyfills": [
29+
"src/polyfills.ts"
30+
],
2831
"tsConfig": "tsconfig.app.json",
2932
"inlineStyleLanguage": "scss",
3033
"allowedCommonJsDependencies": ["chart.js", "js-sha256"],
@@ -108,7 +111,8 @@
108111
"node_modules/bootstrap-icons/font/bootstrap-icons.css",
109112
"src/styles.scss"
110113
],
111-
"scripts": []
114+
"scripts": [],
115+
"browser": "src/main.ts"
112116
},
113117
"configurations": {
114118
"production": {
@@ -133,9 +137,7 @@
133137
"outputHashing": "all"
134138
},
135139
"development": {
136-
"buildOptimizer": false,
137140
"optimization": false,
138-
"vendorChunk": true,
139141
"extractLicenses": false,
140142
"sourceMap": true,
141143
"namedChunks": true
@@ -144,25 +146,25 @@
144146
"defaultConfiguration": "production"
145147
},
146148
"serve": {
147-
"builder": "@angular-devkit/build-angular:dev-server",
149+
"builder": "@angular/build:dev-server",
148150
"configurations": {
149151
"production": {
150-
"browserTarget": "TodoApp:build:production"
152+
"buildTarget": "TodoApp:build:production"
151153
},
152154
"development": {
153-
"browserTarget": "TodoApp:build:development"
155+
"buildTarget": "TodoApp:build:development"
154156
}
155157
},
156158
"defaultConfiguration": "development"
157159
},
158160
"extract-i18n": {
159-
"builder": "@angular-devkit/build-angular:extract-i18n",
161+
"builder": "@angular/build:extract-i18n",
160162
"options": {
161-
"browserTarget": "TodoApp:build"
163+
"buildTarget": "TodoApp:build"
162164
}
163165
},
164166
"test": {
165-
"builder": "@angular-devkit/build-angular:karma",
167+
"builder": "@angular/build:karma",
166168
"options": {
167169
"main": "src/test.ts",
168170
"polyfills": "src/polyfills.ts",

TodoApp-SingleLayer/Angular-EfCore/angular/karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = function (config) {
1010
require('karma-chrome-launcher'),
1111
require('karma-jasmine-html-reporter'),
1212
require('karma-coverage'),
13-
require('@angular-devkit/build-angular/plugins/karma')
13+
1414
],
1515
client: {
1616
jasmine: {

TodoApp-SingleLayer/Angular-EfCore/angular/package.json

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -12,42 +12,42 @@
1212
},
1313
"private": true,
1414
"dependencies": {
15-
"@abp/ng.account": "^8.3.0",
16-
"@abp/ng.components": "^8.3.0",
17-
"@abp/ng.core": "^8.3.0",
18-
"@abp/ng.oauth": "^8.3.0",
19-
"@abp/ng.identity": "^8.3.0",
20-
"@abp/ng.setting-management": "^8.3.0",
21-
"@abp/ng.tenant-management": "^8.3.0",
22-
"@abp/ng.theme.shared": "^8.3.0",
23-
"@abp/ng.theme.lepton-x": "~3.3.0",
24-
"@angular/animations": "^18.1.0",
25-
"@angular/common": "^18.1.0",
26-
"@angular/compiler": "^18.1.0",
27-
"@angular/core": "^18.1.0",
28-
"@angular/forms": "^18.1.0",
29-
"@angular/localize": "^18.1.0",
30-
"@angular/platform-browser": "^18.1.0",
31-
"@angular/platform-browser-dynamic": "^18.1.0",
32-
"@angular/router": "^18.1.0",
33-
"rxjs": "7.5.6",
34-
"tslib": "^2.1.0",
15+
"@abp/ng.account": "~9.3.6",
16+
"@abp/ng.components": "~9.3.6",
17+
"@abp/ng.core": "~9.3.6",
18+
"@abp/ng.oauth": "~9.3.6",
19+
"@abp/ng.identity": "~9.3.6",
20+
"@abp/ng.setting-management": "~9.3.6",
21+
"@abp/ng.tenant-management": "~9.3.6",
22+
"@abp/ng.theme.shared": "~9.3.6",
23+
"@abp/ng.theme.lepton-x": "~4.3.6",
24+
"@angular/animations": "~20.0.0",
25+
"@angular/common": "~20.0.0",
26+
"@angular/compiler": "~20.0.0",
27+
"@angular/core": "~20.0.0",
28+
"@angular/forms": "~20.0.0",
29+
"@angular/localize": "~20.0.0",
30+
"@angular/platform-browser": "~20.0.0",
31+
"@angular/platform-browser-dynamic": "~20.0.0",
32+
"@angular/router": "~20.0.0",
33+
"rxjs": "~7.8.0",
3534
"bootstrap-icons": "~1.8.3",
36-
"zone.js": "~0.14.0"
35+
"tslib": "^2.0.0",
36+
"zone.js": "~0.15.0"
3737
},
3838
"devDependencies": {
39-
"@abp/ng.schematics": "^8.3.0",
40-
"@angular-devkit/build-angular": "^18.1.0",
41-
"@angular-eslint/builder": "~18.1.0",
42-
"@angular-eslint/eslint-plugin": "~18.1.0",
43-
"@angular-eslint/eslint-plugin-template": "~18.1.0",
44-
"@angular-eslint/schematics": "~18.1.0",
45-
"@angular-eslint/template-parser": "~18.1.0",
46-
"@angular/cli": "^18.1.0",
47-
"@angular/compiler-cli": "^18.1.0",
48-
"@angular/language-service": "^18.1.0",
39+
"@abp/ng.schematics": "~9.3.6",
40+
"@angular-eslint/builder": "~20.0.0",
41+
"@angular-eslint/eslint-plugin": "~20.0.0",
42+
"@angular-eslint/eslint-plugin-template": "~20.0.0",
43+
"@angular-eslint/schematics": "~20.0.0",
44+
"@angular-eslint/template-parser": "~20.0.0",
45+
"@angular/build": "~20.0.0",
46+
"@angular/cli": "~20.0.0",
47+
"@angular/compiler-cli": "~20.0.0",
48+
"@angular/language-service": "~20.0.0",
4949
"@types/jasmine": "~3.6.0",
50-
"@types/node": "^12.11.1",
50+
"@types/node": "^20.0.0",
5151
"@typescript-eslint/eslint-plugin": "^5.36.2",
5252
"@typescript-eslint/parser": "^5.36.2",
5353
"eslint": "^8.23.0",
@@ -57,7 +57,7 @@
5757
"karma-coverage": "~2.1.0",
5858
"karma-jasmine": "~4.0.0",
5959
"karma-jasmine-html-reporter": "^1.7.0",
60-
"ng-packagr": "^18.1.0",
61-
"typescript": "~5.4.0"
60+
"ng-packagr": "~20.0.0",
61+
"typescript": "~5.8.0"
6262
}
63-
}
63+
}

TodoApp-SingleLayer/Angular-EfCore/angular/src/app/app-routing.module.ts

Lines changed: 0 additions & 34 deletions
This file was deleted.
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import { Component } from '@angular/core';
2+
import {LoaderBarComponent} from "@abp/ng.theme.shared";
3+
import {DynamicLayoutComponent} from "@abp/ng.core";
24

35
@Component({
46
selector: 'app-root',
57
template: `
6-
<abp-loader-bar></abp-loader-bar>
7-
<abp-dynamic-layout></abp-dynamic-layout>
8+
<abp-loader-bar/>
9+
<abp-dynamic-layout/>
810
`,
11+
imports: [LoaderBarComponent, DynamicLayoutComponent]
912
})
1013
export class AppComponent {}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import { provideAbpCore, withOptions } from '@abp/ng.core';
2+
import { provideAbpOAuth } from '@abp/ng.oauth';
3+
import { provideSettingManagementConfig } from '@abp/ng.setting-management/config';
4+
import { provideFeatureManagementConfig } from '@abp/ng.feature-management';
5+
import { provideAbpThemeShared } from '@abp/ng.theme.shared';
6+
import { provideLogo, withEnvironmentOptions } from '@volo/ngx-lepton-x.core';
7+
import { ApplicationConfig } from '@angular/core';
8+
import { provideAnimations } from '@angular/platform-browser/animations';
9+
import { provideRouter } from '@angular/router';
10+
import { environment } from '../environments/environment';
11+
import { APP_ROUTES } from './app.routes';
12+
import { APP_ROUTE_PROVIDER } from './route.provider';
13+
import { registerLocaleForEsBuild } from '@abp/ng.core/locale';
14+
import { provideThemeLeptonX } from '@abp/ng.theme.lepton-x';
15+
import { provideTenantManagementConfig } from '@abp/ng.tenant-management/config';
16+
import { provideIdentityConfig } from '@abp/ng.identity/config';
17+
import { provideAccountConfig } from '@abp/ng.account/config';
18+
import { provideSideMenuLayout } from '@abp/ng.theme.lepton-x/layouts';
19+
20+
export const appConfig: ApplicationConfig = {
21+
providers: [
22+
provideRouter(APP_ROUTES),
23+
APP_ROUTE_PROVIDER,
24+
provideAnimations(),
25+
provideAbpCore(
26+
withOptions({
27+
environment,
28+
registerLocaleFn: registerLocaleForEsBuild(),
29+
})
30+
),
31+
provideAbpOAuth(),
32+
provideSettingManagementConfig(),
33+
provideFeatureManagementConfig(),
34+
provideAbpThemeShared(),
35+
provideSideMenuLayout(),
36+
provideThemeLeptonX(),
37+
provideTenantManagementConfig(),
38+
provideIdentityConfig(),
39+
provideAccountConfig(),
40+
provideLogo(withEnvironmentOptions(environment)),
41+
],
42+
};

TodoApp-SingleLayer/Angular-EfCore/angular/src/app/app.module.ts

Lines changed: 0 additions & 43 deletions
This file was deleted.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { Routes } from '@angular/router';
2+
3+
export const APP_ROUTES: Routes = [
4+
{
5+
path: '',
6+
pathMatch: 'full',
7+
loadComponent: () => import('./home/home.component').then(c => c.HomeComponent),
8+
},
9+
{
10+
path: 'account',
11+
loadChildren: () => import('@abp/ng.account').then(c => c.createRoutes()),
12+
},
13+
{
14+
path: 'identity',
15+
loadChildren: () => import('@abp/ng.identity').then(c => c.createRoutes()),
16+
},
17+
{
18+
path: 'tenant-management',
19+
loadChildren: () =>
20+
import('@abp/ng.tenant-management').then(c => c.createRoutes()),
21+
},
22+
{
23+
path: 'setting-management',
24+
loadChildren: () =>
25+
import('@abp/ng.setting-management').then(c => c.createRoutes()),
26+
},
27+
];

TodoApp-SingleLayer/Angular-EfCore/angular/src/app/home/home-routing.module.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

TodoApp-SingleLayer/Angular-EfCore/angular/src/app/home/home.component.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@
1717
</form>
1818
<!-- TODO ITEMS LIST -->
1919
<ul id="TodoList">
20-
<li *ngFor="let todoItem of todoItems">
21-
<i class="fa fa-trash-o" (click)="delete(todoItem.id)"></i> {{ todoItem.text }}
22-
</li>
20+
@for (todoItem of todoItems; track todoItem.id) {
21+
<li>
22+
<i class="fa fa-trash-o" (click)="delete(todoItem.id)"></i> {{ todoItem.text }}
23+
</li>
24+
}
2325
</ul>
2426
</div>
2527
</div>
26-
</div>
28+
</div>

0 commit comments

Comments
 (0)