diff --git a/aio/content/examples/forms-overview/src/app/reactive/favorite-color/favorite-color.component.spec.ts b/aio/content/examples/forms-overview/src/app/reactive/favorite-color/favorite-color.component.spec.ts
index 5d74a1a8da..5b676c08b8 100644
--- a/aio/content/examples/forms-overview/src/app/reactive/favorite-color/favorite-color.component.spec.ts
+++ b/aio/content/examples/forms-overview/src/app/reactive/favorite-color/favorite-color.component.spec.ts
@@ -34,13 +34,13 @@ describe('Favorite Color Component', () => {
input.value = 'Red';
input.dispatchEvent(event);
- expect(fixture.componentInstance.favoriteColor.value).toEqual('Red');
+ expect(fixture.componentInstance.favoriteColorControl.value).toEqual('Red');
});
// #enddocregion view-to-model
// #docregion model-to-view
it('should update the value in the control', () => {
- component.favoriteColor.setValue('Blue');
+ component.favoriteColorControl.setValue('Blue');
const input = fixture.nativeElement.querySelector('input');
diff --git a/aio/content/examples/forms-overview/src/app/reactive/favorite-color/favorite-color.component.ts b/aio/content/examples/forms-overview/src/app/reactive/favorite-color/favorite-color.component.ts
index 560c8a0785..25e901f6e4 100644
--- a/aio/content/examples/forms-overview/src/app/reactive/favorite-color/favorite-color.component.ts
+++ b/aio/content/examples/forms-overview/src/app/reactive/favorite-color/favorite-color.component.ts
@@ -1,19 +1,13 @@
-import { Component, OnInit } from '@angular/core';
+import { Component } from '@angular/core';
import { FormControl } from '@angular/forms';
@Component({
selector: 'app-reactive-favorite-color',
template: `
- Favorite Color:
+ Favorite Color:
`,
styles: []
})
-export class FavoriteColorComponent implements OnInit {
- favoriteColor = new FormControl('');
-
- constructor() { }
-
- ngOnInit() {
- }
-
+export class FavoriteColorComponent {
+ favoriteColorControl = new FormControl('');
}
diff --git a/aio/content/examples/forms-overview/src/app/template/favorite-color/favorite-color.component.spec.ts b/aio/content/examples/forms-overview/src/app/template/favorite-color/favorite-color.component.spec.ts
index bf7c5e3e0b..60e1830b4d 100644
--- a/aio/content/examples/forms-overview/src/app/template/favorite-color/favorite-color.component.spec.ts
+++ b/aio/content/examples/forms-overview/src/app/template/favorite-color/favorite-color.component.spec.ts
@@ -48,7 +48,7 @@ describe('FavoriteColorComponent', () => {
input.value = 'Red';
input.dispatchEvent(event);
- tick();
+ fixture.detectChanges();
expect(component.favoriteColor).toEqual('Red');
}));
diff --git a/aio/content/examples/forms-overview/src/app/template/favorite-color/favorite-color.component.ts b/aio/content/examples/forms-overview/src/app/template/favorite-color/favorite-color.component.ts
index ae9aec840b..b5abdffcff 100644
--- a/aio/content/examples/forms-overview/src/app/template/favorite-color/favorite-color.component.ts
+++ b/aio/content/examples/forms-overview/src/app/template/favorite-color/favorite-color.component.ts
@@ -1,4 +1,4 @@
-import { Component, OnInit } from '@angular/core';
+import { Component } from '@angular/core';
@Component({
selector: 'app-template-favorite-color',
@@ -7,12 +7,6 @@ import { Component, OnInit } from '@angular/core';
`,
styles: []
})
-export class FavoriteColorComponent implements OnInit {
+export class FavoriteColorComponent {
favoriteColor = '';
-
- constructor() { }
-
- ngOnInit() {
- }
-
}
diff --git a/aio/content/guide/forms-overview.md b/aio/content/guide/forms-overview.md
index d8e9000871..7b99d3b6d0 100644
--- a/aio/content/guide/forms-overview.md
+++ b/aio/content/guide/forms-overview.md
@@ -34,7 +34,7 @@ Both reactive and template-driven forms share underlying building blocks.
- A `FormControl` instance that tracks the value and validation status of an individual form control.
- A `FormGroup` instance that tracks the same values and statuses for a collection of form controls.
- A `FormArray` instance that tracks the same values and statues for an array of form controls.
-- A `ControlValueAccessor` that creates a bridge between Angular form controls and native DOM elements.
+- A `ControlValueAccessor` that creates a bridge between Angular `FormControl` instances and native DOM elements.
How these control instances are created and managed with reactive and template-driven forms is introduced in the [form model](#the-form-model) section below and detailed further in the [data flow section](#data-flow-in-forms) of this guide.
@@ -67,7 +67,7 @@ Here is a component with an input field for a single control implemented using r
-The diagrams below shows how the data flows for an input with reactive forms.
+The diagrams below show how the data flows for an input with reactive forms.