Skip to content

Commit

Permalink
Merge pull request #2861 from qmonmert/angular/typedform
Browse files Browse the repository at this point in the history
Angular: use new syntax 'Typed Angular Forms'
  • Loading branch information
pascalgrimaud authored Jul 31, 2022
2 parents 6815c94 + 2f0480a commit 5a036d5
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class LoginComponent implements OnInit, OnDestroy {
account: Account | null = null;
loginForm = this.fb.group({
loginForm = this.fb.nonNullable.group({
username: ['', [Validators.required]],
password: ['', [Validators.required]],
});
Expand All @@ -40,8 +40,8 @@ export class LoginComponent implements OnInit, OnDestroy {
login(): void {
this.loginService
.login({
username: this.loginForm.get('username')!.value,
password: this.loginForm.get('password')!.value,
username: this.loginForm.value.username!,
password: this.loginForm.value.password!,
})
.subscribe();
}
Expand Down

0 comments on commit 5a036d5

Please sign in to comment.