Migration Angular 20 -> 21 : fin de la migration securite (0 vulnerabilite npm)

- ng update @angular/core@21 @angular/cli@21 (corrige GHSA-jrmj-c5cx-3cw6, XSS SVG)
- Migration automatique des templates vers le control flow natif (@if/@for, 138 fichiers)
- Correction des 5 `track` invalides generes par la migration (trackBy a 1 argument
  -> track $index) + suppression des fonctions trackBy mortes
- TypeScript 5.9, zone.js 0.15 ; npm audit : 0 vulnerabilite

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 14:55:36 +02:00
co-authored by Claude Opus 4.8
parent 6acad41672
commit 23878f1c63
142 changed files with 7054 additions and 6291 deletions
@@ -1,12 +1,20 @@
<nav class="breadcrumb" aria-label="Fil d'Ariane" *ngIf="items.length">
<ol>
<li *ngFor="let item of items; let last = last; trackBy: trackByIndex"
class="breadcrumb-item"
[class.current]="last">
<a *ngIf="item.route && !last"
[routerLink]="item.route"
class="breadcrumb-link">{{ item.label }}</a>
<span *ngIf="!item.route || last" class="breadcrumb-text">{{ item.label }}</span>
</li>
</ol>
</nav>
@if (items.length) {
<nav class="breadcrumb" aria-label="Fil d'Ariane">
<ol>
@for (item of items; track $index; let last = $last) {
<li
class="breadcrumb-item"
[class.current]="last">
@if (item.route && !last) {
<a
[routerLink]="item.route"
class="breadcrumb-link">{{ item.label }}</a>
}
@if (!item.route || last) {
<span class="breadcrumb-text">{{ item.label }}</span>
}
</li>
}
</ol>
</nav>
}
@@ -1,5 +1,5 @@
import { Component, Input } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterLink } from '@angular/router';
/**
@@ -23,12 +23,11 @@ export interface BreadcrumbItem {
*/
@Component({
selector: 'app-breadcrumb',
imports: [CommonModule, RouterLink],
imports: [RouterLink],
templateUrl: './breadcrumb.component.html',
styleUrls: ['./breadcrumb.component.scss']
})
export class BreadcrumbComponent {
@Input() items: BreadcrumbItem[] = [];
trackByIndex = (i: number) => i;
}