Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit aba1cda

Browse files
Merge pull request #306 from abpframework/issue-7556
Update BookStore Tutorial (Angular-MongoDB) - Issue 7556
2 parents 61da693 + b67d33e commit aba1cda

File tree

47 files changed

+4332
-6192
lines changed
  • BookStore-Angular-MongoDb/angular
    • angular.json
    • karma.conf.js
    • package.json
    • src
      • app
        • app-routing.module.ts
        • app.component.ts
        • app.config.ts
        • app.module.ts
        • app.routes.ts
        • author
          • author-routing.module.ts
          • author.component.html
          • author.component.spec.ts
          • author.component.ts
          • author.module.ts
        • book
          • book-routing.module.ts
          • book.component.html
          • book.component.spec.ts
          • book.component.ts
          • book.module.ts
        • home
          • home-routing.module.ts
          • home.component.html
          • home.component.scss
          • home.component.spec.ts
          • home.component.ts
          • home.module.ts
        • proxy
          • authors
            • author.service.ts
          • books
            • book.service.ts
        • route.provider.ts
        • shared
          • shared.module.ts
      • assets/images/getting-started
        • abp-blog-white.svg
        • abp-blog.svg
        • abp-community-white.svg
        • abp-community.svg
        • abp-support-white.svg
        • abp-support.svg
        • bg-01.png
        • book.png
        • discord.svg
        • img-blog.png
        • img-community.png
        • img-support.png
        • instagram.svg
        • stack-overflow.svg
        • x-white.svg
        • x.svg
        • youtube.svg
      • main.ts
    • yarn.lock

Some content is hidden

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

47 files changed

+4332
-6192
lines changed

BookStore-Angular-MongoDb/angular/angular.json

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@
1919
"prefix": "app",
2020
"architect": {
2121
"build": {
22-
"builder": "@angular-devkit/build-angular:browser",
22+
"builder": "@angular/build:application",
2323
"options": {
24-
"outputPath": "dist/BookStore",
24+
"outputPath": {
25+
"base": "dist/BookStore"
26+
},
2527
"index": "src/index.html",
26-
"main": "src/main.ts",
27-
"polyfills": "src/polyfills.ts",
28+
"polyfills": ["src/polyfills.ts"],
2829
"tsConfig": "tsconfig.app.json",
2930
"inlineStyleLanguage": "scss",
3031
"allowedCommonJsDependencies": ["chart.js", "js-sha256"],
@@ -108,7 +109,8 @@
108109
"node_modules/bootstrap-icons/font/bootstrap-icons.css",
109110
"src/styles.scss"
110111
],
111-
"scripts": []
112+
"scripts": [],
113+
"browser": "src/main.ts"
112114
},
113115
"configurations": {
114116
"production": {
@@ -133,9 +135,7 @@
133135
"outputHashing": "all"
134136
},
135137
"development": {
136-
"buildOptimizer": false,
137138
"optimization": false,
138-
"vendorChunk": true,
139139
"extractLicenses": false,
140140
"sourceMap": true,
141141
"namedChunks": true
@@ -144,25 +144,25 @@
144144
"defaultConfiguration": "production"
145145
},
146146
"serve": {
147-
"builder": "@angular-devkit/build-angular:dev-server",
147+
"builder": "@angular/build:dev-server",
148148
"configurations": {
149149
"production": {
150-
"browserTarget": "BookStore:build:production"
150+
"buildTarget": "BookStore:build:production"
151151
},
152152
"development": {
153-
"browserTarget": "BookStore:build:development"
153+
"buildTarget": "BookStore:build:development"
154154
}
155155
},
156156
"defaultConfiguration": "development"
157157
},
158158
"extract-i18n": {
159-
"builder": "@angular-devkit/build-angular:extract-i18n",
159+
"builder": "@angular/build:extract-i18n",
160160
"options": {
161-
"browserTarget": "BookStore:build"
161+
"buildTarget": "BookStore:build"
162162
}
163163
},
164164
"test": {
165-
"builder": "@angular-devkit/build-angular:karma",
165+
"builder": "@angular/build:karma",
166166
"options": {
167167
"main": "src/test.ts",
168168
"polyfills": "src/polyfills.ts",
@@ -182,6 +182,5 @@
182182
}
183183
}
184184
}
185-
},
186-
"defaultProject": "BookStore"
185+
}
187186
}

BookStore-Angular-MongoDb/angular/karma.conf.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ 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')
1413
],
1514
client: {
1615
jasmine: {

BookStore-Angular-MongoDb/angular/package.json

Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,42 +12,43 @@
1212
},
1313
"private": true,
1414
"dependencies": {
15-
"@abp/ng.account": "^10.0.0-rc.1",
16-
"@abp/ng.components": "^10.0.0-rc.1",
17-
"@abp/ng.core": "^10.0.0-rc.1",
18-
"@abp/ng.oauth": "^10.0.0-rc.1",
19-
"@abp/ng.identity": "^10.0.0-rc.1",
20-
"@abp/ng.setting-management": "^10.0.0-rc.1",
21-
"@abp/ng.tenant-management": "^10.0.0-rc.1",
22-
"@abp/ng.theme.shared": "^10.0.0-rc.1",
23-
"@abp/ng.theme.lepton-x": "~5.0.0-rc.1",
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",
15+
"@abp/ng.account": "~10.0.0",
16+
"@abp/ng.components": "~10.0.0",
17+
"@abp/ng.core": "~10.0.0",
18+
"@abp/ng.oauth": "~10.0.0",
19+
"@abp/ng.identity": "~10.0.0",
20+
"@abp/ng.setting-management": "~10.0.0",
21+
"@abp/ng.tenant-management": "~10.0.0",
22+
"@abp/ng.theme.shared": "~10.0.0",
23+
"@abp/ng.theme.lepton-x": "~5.0.0",
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",
3333
"bootstrap-icons": "~1.8.3",
34-
"rxjs": "7.5.6",
34+
"rxjs": "~7.8.0",
3535
"tslib": "^2.1.0",
36-
"zone.js": "~0.14.0"
36+
"zone.js": "~0.15.0"
3737
},
3838
"devDependencies": {
39-
"@abp/ng.schematics": "^10.0.0-rc.1",
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": "~10.0.0",
40+
"@angular-devkit/build-angular": "~20.0.0",
41+
"@angular-eslint/builder": "~20.0.0",
42+
"@angular-eslint/eslint-plugin": "~20.0.0",
43+
"@angular-eslint/eslint-plugin-template": "~20.0.0",
44+
"@angular-eslint/schematics": "~20.0.0",
45+
"@angular-eslint/template-parser": "~20.0.0",
46+
"@angular/build": "~20.0.0",
47+
"@angular/cli": "~20.0.0",
48+
"@angular/compiler-cli": "~20.0.0",
49+
"@angular/language-service": "~20.0.0",
4950
"@types/jasmine": "~3.6.0",
50-
"@types/node": "^12.11.1",
51+
"@types/node": "~20.0.0",
5152
"@typescript-eslint/eslint-plugin": "^5.36.2",
5253
"@typescript-eslint/parser": "^5.36.2",
5354
"eslint": "^8.23.0",
@@ -57,7 +58,7 @@
5758
"karma-coverage": "~2.1.0",
5859
"karma-jasmine": "~4.0.0",
5960
"karma-jasmine-html-reporter": "^1.7.0",
60-
"ng-packagr": "^18.1.0",
61-
"typescript": "~5.4.0"
61+
"ng-packagr": "~20.0.0",
62+
"typescript": "~5.8.0"
6263
}
63-
}
64+
}

BookStore-Angular-MongoDb/angular/src/app/app-routing.module.ts

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

BookStore-Angular-MongoDb/angular/src/app/app.component.ts

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

35
@Component({
46
selector: 'app-root',
57
template: `
6-
>>
7-
>>
8+
/>
9+
/>
810
`,
11+
imports: [LoaderBarComponent, DynamicLayoutComponent],
912
})
1013
export class AppComponent {}

BookStore-Angular-MongoDb/angular/src/app/app.config.ts

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+
};

BookStore-Angular-MongoDb/angular/src/app/app.module.ts

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

BookStore-Angular-MongoDb/angular/src/app/app.routes.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import { Routes } from '@angular/router';
2+
import { authGuard, permissionGuard } from '@abp/ng.core';
3+
4+
export const APP_ROUTES: Routes = [
5+
{
6+
path: '',
7+
loadComponent: () => import('./home/home.component').then(m => m.HomeComponent),
8+
},
9+
{
10+
path: 'books',
11+
canActivate: [authGuard, permissionGuard],
12+
loadComponent: () => import('./book/book.component').then(m => m.BookComponent),
13+
},
14+
{
15+
path: 'authors',
16+
canActivate: [authGuard, permissionGuard],
17+
loadComponent: () => import('./author/author.component').then(m => m.AuthorComponent),
18+
},
19+
{
20+
path: 'account',
21+
loadChildren: () => import('@abp/ng.account').then(c => c.createRoutes()),
22+
},
23+
{
24+
path: 'identity',
25+
loadChildren: () => import('@abp/ng.identity').then(c => c.createRoutes()),
26+
},
27+
{
28+
path: 'tenant-management',
29+
loadChildren: () => import('@abp/ng.tenant-management').then(c => c.createRoutes()),
30+
},
31+
{
32+
path: 'setting-management',
33+
loadChildren: () => import('@abp/ng.setting-management').then(c => c.createRoutes()),
34+
},
35+
{ path: '**', redirectTo: '' },
36+
];

BookStore-Angular-MongoDb/angular/src/app/author/author-routing.module.ts

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

BookStore-Angular-MongoDb/angular/src/app/author/author.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
div>
1818
div>
1919
<div class="card-body">
20-
<ngx-datatable [rows]="author.items" [count]="author.totalCount" [list]="list" default>
20+
<ngx-datatable [rows]="author.items" [count]="author.totalCount" [list]="list" default>
2121
<ngx-datatable-column
2222
[name]="'::Actions' | abpLocalization"
2323
[maxWidth]="150"
@@ -44,7 +44,7 @@
4444
div>
4545
ng-template>
4646
ngx-datatable-column>
47-
<ngx-datatable-column [name]="'::Name' | abpLocalization" prop="name">ngx-datatable-column>
47+
<ngx-datatable-column [name]="'::Name' | abpLocalization" prop="name" />
4848
<ngx-datatable-column [name]="'::BirthDate' | abpLocalization">
4949
<ng-template let-row="row" ngx-datatable-cell-template>
5050
{{ row.birthDate | date }}

0 commit comments

Comments
(0)