Skip to content

Migrate templates to built-in control flow replaced *ngIf, *ngFor - #7181

Open
cdavalos7 wants to merge 1 commit into
tensorflow:masterfrom
cdavalos7:feature/angular-23-deprecations
Open

cdavalos7 wants to merge 1 commit into
tensorflow:masterfrom
cdavalos7:feature/angular-23-deprecations

Conversation

@cdavalos7

Copy link
Copy Markdown
Contributor

Motivation for features / changes

*ngIf, *ngFor, *ngSwitch and ChangeDetectionStrategy.Default are deprecated. Removing them now gets the codebase ready for Angular 23.

Technical description of changes

Templates were migrated to @if, @for and @switch with the Angular control-flow schematic. Three templates the schematic could not handle were converted by hand. ChangeDetectionStrategy.Default was replaced with its alias Eager. @for blocks that iterate over objects rebuilt on every change detection pass now track a stable key (id or name), which avoids NG0100 errors. The change also fixes *NgSwitchDefault in the data download dialog, which had never rendered because of its capital N.

Screenshots of UI changes (or N/A)

N/A

Detailed steps to verify changes work correctly (as executed by you)

  1. Ran all 13 Karma suites, and all of them passed.
  2. Ran bazel build //tensorboard/webapp/... and the bundle check, which passed.
  3. Opened every plugin against demo data and checked for console errors. There were none.

Alternate designs / implementations considered (or N/A)

N/A

@cdavalos7
cdavalos7 marked this pull request as ready for review December 2, 2026 19:01
… *ngSwitch with @if, @for and @switch, and ChangeDetectionStrategy.Default with Eager, ahead of Angular 23.
@cdavalos7
cdavalos7 force-pushed the feature/angular-23-deprecations branch from 3512856 to 5493a19 Compare December 2, 2026 19:05
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.

1 participant