diff --git a/README.md b/README.md index 0609040..2c9eda2 100644 --- a/README.md +++ b/README.md @@ -4148,24 +4148,24 @@ ``` Finally, the component with reactive form control appears as below, - ```js - import { Component } from '@angular/core'; - import { FormControl } from '@angular/forms'; - - @Component({ - selector: 'user-profile', - styleUrls: ['./user-profile.component.css'] - template: ` - - ` - }) - export class UserProfileComponent { - userName = new FormControl(''); - } - ``` + ```js + import { Component } from '@angular/core'; + import { FormControl } from '@angular/forms'; + + @Component({ + selector: 'user-profile', + styleUrls: ['./user-profile.component.css'], + template: ` + + ` + }) + export class UserProfileComponent { + userName = new FormControl(''); + } + ``` **[⬆ Back to Top](#table-of-contents)** @@ -4200,8 +4200,8 @@ 2. Bind the form from template to the component using ngModel syntax ```html + required + [(ngModel)]="model.name" name="name"> ``` 3. Attach NgForm directive to the
tag in order to create FormControl instances and register them ```js @@ -4225,28 +4225,26 @@ // Form goes here ``` - Finally, the completed template-driven registration form will be appeared as follow. - - ```html -
-

Registration Form

- -
- - -
- Please enter your name -
-
- - + ```html +
+

Registration Form

+
+
+ + +
+ Please enter your name +
- ``` + +
+
+ ``` **[⬆ Back to Top](#table-of-contents)**