Skip to content

chore: update Angular 18 → 21#3

Open
Copilot wants to merge 4 commits into
masterfrom
copilot/update-to-latest-angular
Open

chore: update Angular 18 → 21#3
Copilot wants to merge 4 commits into
masterfrom
copilot/update-to-latest-angular

Conversation

Copilot AI commented Jun 9, 2026

Copy link
Copy Markdown

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

  • All @angular/* packages: ~18.2.x~21.2.x
  • @angular-devkit/build-angular, @angular/cli, ng-packagr updated to match
  • TypeScript: ~5.4.05.9.3

Configuration fixes

  • tsconfig.base.json: moduleResolution: nodebundler; target/module/lib bumped to es2022 — required for Angular 21's sub-path package exports (@angular/core/primitives/di etc.)
  • 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.16

Auto-applied migrations

  • standalone: false made explicit on non-standalone components (Angular 19)
  • Template control flow converted to block syntax (@if/@for) in two component templates (Angular 21)
  • main.ts bootstrap options migrated to providers API (Angular 21)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, and ng-packagr builder migration).
  • Applied Angular migrations in code/templates (explicit standalone: false, new @if block 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">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants