You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
angular_minigame/src/app/components/test-form-template/test-form-template.componen...

21 lines
491 B

import { Component } from '@angular/core';
import { FormsModule } from '@angular/forms';
@Component({
selector: 'app-test-form-template',
standalone: true,
imports: [FormsModule],
templateUrl: './test-form-template.component.html'
})
export class TestFormTemplateComponent {
book = {
title: '',
author: ''
};
onSubmit() {
console.log('Résultat du formulaire template-driven : ', this.book);
// Envoyer un évènement au parent avec la variable remplie
}
}