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