// src/app/app.component.ts import { Component } from '@angular/core'; import { CommonModule } from '@angular/common'; import { TitleSheetsFormComponent } from './view/components/title-sheets-form/title-sheets-form.component'; import { TitleSheet, createEmptyTitleSheet } from './models/title-sheet.model'; import { Router, RouterModule, RouterOutlet } from '@angular/router'; @Component({ selector: 'app-root', standalone: true, imports: [ CommonModule, RouterOutlet, TitleSheetsFormComponent // ← Import direct du composant ], templateUrl: './app.component.html', styleUrls: ['./app.component.scss'] }) export class AppComponent { title = 'test-title-sheets'; testTitleSheet: TitleSheet; debugInfo: any = {}; constructor() { // Créer un titleSheet de test this.testTitleSheet = createEmptyTitleSheet(); this.debugInfo.testTitleSheet = this.testTitleSheet; } onTitleSheetSaved(titleSheet: TitleSheet): void { console.log('Title Sheet saved:', titleSheet); this.debugInfo.lastSaved = titleSheet; this.debugInfo.savedAt = new Date(); // Créer un nouveau titleSheet pour la suite this.testTitleSheet = createEmptyTitleSheet(); } onFormReset(): void { console.log('Form reset'); this.debugInfo.lastAction = 'Form reset'; this.debugInfo.resetAt = new Date(); } }