Template-driven Forms đ€ą
1. ngModel
ngModel@Component({
templateUrl: './book-form.component.html'
})
export class BookFormComponent {
bookTitle: string;
}<form>
<input
name="title"
[(ngModel)]="bookTitle">
</form>Exemple de "Two-way Binding"

2. Détection du "submit" avec ngSubmit
ngSubmitsubmit vs ngSubmit
submit vs ngSubmitTwo-way Binding vs. Immutabilité
Mis Ă jour