Skip to content

Commit 9976988

Browse files
willshowellandrewseguin
authored andcommitted
docs(autocomplete): add mention of reactive forms (#7691)
* docs(autocomplete): add mention of reactive forms * Rearrange words
1 parent f299d25 commit 9976988

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/lib/autocomplete/autocomplete.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@ You can read more about autocompletes in the [Material Design spec](https://mate
33

44
### Simple autocomplete
55

6-
Start by adding a regular `matInput` to the page. Let's assume you're using the `formControl`
7-
directive from the `@angular/forms` module to track the value of the input.
6+
Start by adding a regular `matInput` to your template. Let's assume you're using the `formControl`
7+
directive from `ReactiveFormsModule` to track the value of the input.
8+
9+
> Note: It is possible to use template-driven forms instead, if you prefer. We use reactive forms
10+
in this example because it makes subscribing to changes in the input's value easy. For this example, be sure to
11+
import `ReactiveFormsModule` from `@angular/forms` into your `NgModule`. If you are unfamiliar with using reactive
12+
forms, you can read more about the subject in the [Angular documentation](https://angular.io/guide/reactive-forms).
813

914
*my-comp.html*
1015
```html

0 commit comments

Comments
 (0)