July 2018
Intermediate to advanced
420 pages
8h 46m
English
Now, let's repeat the same operation on the registration page template:
Open ./Client/src/app/auth/register/register.component.html.
[formGroup]="registerForm" (ngSubmit)="onSubmit()" class="form-signin" novalidate
Note the use of formGroup attribute. It is part of the Angular reactive forms, but don't worry about this now; later in the book, we will discuss template-driven forms and reactive forms.
Now, we will add formControlName to the name, email, and password inputs, while still in ./Client/src/app/auth/register/register.component.html.
Add the following code to the name input:
<input type="name" formControlName="name" class="form-control" ...
Read now
Unlock full access