From 10b4a3dbc942e3bb582306cb1c9764136740b284 Mon Sep 17 00:00:00 2001 From: Adrien Crivelli Date: Fri, 13 Sep 2024 17:33:19 +0200 Subject: [PATCH] Use typed form in template when possible #10701 --- .../components/login/login.component.html | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/client/app/front-office/components/login/login.component.html b/client/app/front-office/components/login/login.component.html index 7dde14e4..761c41c8 100644 --- a/client/app/front-office/components/login/login.component.html +++ b/client/app/front-office/components/login/login.component.html @@ -14,13 +14,15 @@ type="email" (keydown.enter)="maybeConfirm()" /> - @if (form.get('email')?.hasError('maxlength')) { - Maximum {{ form.get('email')?.errors?.maxlength?.requiredLength }} caractères + @if (form.controls.email.hasError('maxlength')) { + Maximum {{ form.controls.email.errors?.maxlength?.requiredLength }} caractères } - @if (form.get('email')?.hasError('email')) { + @if (form.controls.email.hasError('email')) { Courriel invalide } - @if (form.get('email')?.hasError('required')) { + @if (form.controls.email.hasError('required')) { Requis } @@ -37,7 +39,7 @@ type="password" (keydown.enter)="maybeConfirm()" /> - @if (form.get('password')?.hasError('required')) { + @if (form.controls.password.hasError('required')) { Requis }