chore: update Angular 18 → 21#3
Open
Copilot wants to merge 4 commits into
Open
Conversation
Copilot created this pull request from a session on behalf of
irustm
June 9, 2026 19:54
View session
There was a problem hiding this comment.
Pull request overview
Upgrades this Angular workspace (app + angular-canvas-lib library) from Angular 18 to Angular 21, applying the required config/migration changes to keep the build and templates compatible with Angular 21 + TypeScript 5.9.
Changes:
- Bumped Angular framework/tooling versions and TypeScript to align with Angular 21.
- Updated TS/Angular workspace config (notably
moduleResolution: bundler, ES2022 targets, andng-packagrbuilder migration). - Applied Angular migrations in code/templates (explicit
standalone: false, new@ifblock syntax, updated bootstrap providers API).
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.base.json | Moves workspace TS defaults to moduleResolution: bundler and ES2022 to support Angular 21 package exports. |
| src/main.ts | Updates module bootstrap to the newer providers-based options. |
| src/app/game/game-container/game-container.component.ts | Adds explicit standalone: false per Angular migration. |
| src/app/game/game-canvas/game-canvas.component.ts | Adds explicit standalone: false per Angular migration. |
| src/app/game/game-canvas/game-canvas.component.html | Migrates *ngIf usages to @if/@else block syntax. |
| src/app/dom-test/dom-test/dom-test.component.ts | Adds explicit standalone: false per Angular migration. |
| src/app/demos/container/container.component.ts | Adds explicit standalone: false per Angular migration. |
| src/app/demos/components/triangle/triangle.component.ts | Adds explicit standalone: false per Angular migration. |
| src/app/demos/components/triangle/triangle.component.html | Migrates *ngIf usage to @if block syntax. |
| src/app/demos/components/graph-canvas/graph-canvas.component.ts | Adds explicit standalone: false per Angular migration. |
| src/app/app.component.ts | Adds explicit standalone: false per Angular migration. |
| projects/angular-canvas-lib/tsconfig.lib.json | Simplifies lib tsconfig to inherit shared lib settings and normalizes exclude formatting. |
| projects/angular-canvas-lib/package.json | Updates library peer dependencies to Angular 21. |
| package.json | Updates app dependencies/devDependencies to Angular 21 + TypeScript 5.9. |
| angular.json | Updates builder/targets for Angular 21 and applies new schematics defaults. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -1,9 +1,10 @@ | |||
| import {Component, HostListener, OnInit} from '@angular/core'; | |||
Comment on lines
+39
to
+41
| } @else { | ||
| @if (!isPlayed) { | ||
| <div class="main-menu"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrades the workspace and library from Angular 18 to Angular 21 (latest), stepping through each major version as required by the Angular update guide.
Package changes
@angular/*packages:~18.2.x→~21.2.x@angular-devkit/build-angular,@angular/cli,ng-packagrupdated to match~5.4.0→5.9.3Configuration fixes
tsconfig.base.json:moduleResolution: node→bundler;target/module/libbumped toes2022— required for Angular 21's sub-path package exports (@angular/core/primitives/dietc.)angular.json: library builder@angular-devkit/build-ng-packagr:build→@angular-devkit/build-angular:ng-packagr(old builder removed in v19)projects/angular-canvas-lib/package.json: peer deps updated to^21.2.16Auto-applied migrations
standalone: falsemade explicit on non-standalone components (Angular 19)@if/@for) in two component templates (Angular 21)main.tsbootstrap options migrated to providers API (Angular 21)