Skip to content

Commit 62e7bb1

Browse files
committed
chore: bump Angular to 21.1
- remove zone.js from dependencies - Add a signal example
1 parent 0532ff4 commit 62e7bb1

3 files changed

Lines changed: 22 additions & 15 deletions

File tree

angular/angular.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"sourceMap": true
1818
},
1919
"production": {
20-
"aot": true,
2120
"extractLicenses": true,
2221
"namedChunks": false,
2322
"optimization": true,
@@ -30,7 +29,7 @@
3029
"index": "src/index.html",
3130
"browser": "src/main.ts",
3231
"outputPath": "dist/demo",
33-
"polyfills": ["zone.js"],
32+
"polyfills": [],
3433
"scripts": [],
3534
"styles": ["src/global_styles.css"],
3635
"tsConfig": "tsconfig.app.json"

angular/package.json

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,19 @@
77
"build": "ng build"
88
},
99
"dependencies": {
10-
"@angular/animations": "^21.0.3",
11-
"@angular/common": "^21.0.3",
12-
"@angular/compiler": "^21.0.3",
13-
"@angular/core": "^21.0.3",
14-
"@angular/forms": "^21.0.3",
15-
"@angular/platform-browser": "^21.0.3",
16-
"@angular/router": "^21.0.3",
10+
"@angular/common": "^21.1.0",
11+
"@angular/compiler": "^21.1.0",
12+
"@angular/core": "^21.1.0",
13+
"@angular/forms": "^21.1.0",
14+
"@angular/platform-browser": "^21.1.0",
15+
"@angular/router": "^21.0.0",
1716
"rxjs": "^7.8.1",
18-
"tslib": "^2.5.0",
19-
"zone.js": "^0.16.0"
17+
"tslib": "^2.5.0"
2018
},
2119
"devDependencies": {
22-
"@angular/build": "^21.0.2",
23-
"@angular/cli": "^21.0.2",
24-
"@angular/compiler-cli": "^21.0.3",
20+
"@angular/build": "^21.1.0",
21+
"@angular/cli": "^21.1.0",
22+
"@angular/compiler-cli": "^21.1.0",
2523
"typescript": "^5.9.3"
2624
}
2725
}

angular/src/main.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component } from '@angular/core';
1+
import { Component, signal } from '@angular/core';
22
import { bootstrapApplication } from '@angular/platform-browser';
33

44
@Component({
@@ -8,10 +8,20 @@ import { bootstrapApplication } from '@angular/platform-browser';
88
<a target="_blank" href="https://angular.dev/overview">
99
Learn more about Angular
1010
</a>
11+
<div>
12+
<button (click)="counter.set(counter() - 1)">
13+
--
14+
</button>
15+
<p>Counter: {{ counter() }}</p>
16+
<button (click)="counter.set(counter() + 1)">
17+
++
18+
</button>
19+
</div>
1120
`,
1221
})
1322
export class App {
1423
name = 'Angular';
24+
counter = signal(0);
1525
}
1626

1727
bootstrapApplication(App);

0 commit comments

Comments
 (0)