Skip to content

Commit cc26bb9

Browse files
committed
docs: Upgrade angular example to Angular 18 and add example routes
1 parent da1b7ae commit cc26bb9

16 files changed

+11595
-10805
lines changed

examples/angular/.dockerignore

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
/dist
2-
/node_modules
1+
dist
2+
node_modules
3+
Dockerfile
4+
.angular
5+
.idea
6+
.vscode

examples/angular/.gitignore

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
# See http://help.github.com/ignore-files/ for more about ignoring files.
22

33
# compiled output
4-
/dist
5-
/tmp
6-
/out-tsc
4+
dist
5+
tmp
6+
out-tsc
7+
.angular
78
# Only exists if Bazel was run
8-
/bazel-out
9+
bazel-out
910

1011
# dependencies
11-
/node_modules
12+
node_modules
1213

1314
# profiling files
1415
chrome-profiler-events*.json
1516
speed-measure-plugin*.json
1617

1718
# IDEs and editors
18-
/.idea
19+
.idea
1920
.project
2021
.classpath
2122
.c9/

examples/angular/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:12-alpine as build
1+
FROM node:20-alpine as build
22

33
WORKDIR /src
44

examples/angular/angular.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
33
"version": 1,
44
"newProjectRoot": "projects",
5+
"cli": {
6+
"analytics": false,
7+
"packageManager": "npm"
8+
},
59
"projects": {
610
"angular-example": {
711
"projectType": "application",
@@ -35,6 +39,7 @@
3539
},
3640
"configurations": {
3741
"production": {
42+
"aot": true,
3843
"fileReplacements": [
3944
{
4045
"replace": "src/environments/environment.ts",
@@ -44,7 +49,6 @@
4449
"optimization": true,
4550
"outputHashing": "all",
4651
"sourceMap": false,
47-
"extractCss": true,
4852
"namedChunks": false,
4953
"extractLicenses": true,
5054
"vendorChunk": false,
@@ -62,7 +66,8 @@
6266
}
6367
]
6468
}
65-
}
69+
},
70+
"defaultConfiguration": "production"
6671
},
6772
"serve": {
6873
"builder": "@angular-devkit/build-angular:dev-server",
@@ -111,6 +116,6 @@
111116
}
112117
}
113118
}
114-
}},
115-
"defaultProject": "angular-example"
119+
}
120+
}
116121
}

0 commit comments

Comments
 (0)