Skip to content

Commit ea8a161

Browse files
AlexElinmmalerba
authored andcommitted
docs: implement ControlValueAccessor in the code snippet (#21905)
`this` should implement `ControlValueAccessor` because `valueAccessor` has type `ControlValueAccessor | null` in the `this.ngControl.valueAccessor = this;` (cherry picked from commit 8726e57)
1 parent ccbe51e commit ea8a161

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

guides/creating-a-custom-form-field-control.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ To resolve this, remove the `NG_VALUE_ACCESSOR` provider and instead set the val
202202
// },
203203
],
204204
})
205-
export class MyTelInput implements MatFormFieldControl<MyTel> {
205+
export class MyTelInput implements MatFormFieldControl<MyTel>, ControlValueAccessor {
206206
constructor(
207207
...,
208208
@Optional() @Self() public ngControl: NgControl,

0 commit comments

Comments
 (0)