docs: update identity-revealed.directive.ts to use `AbstractControl` instead of `FormGroup` (#40132)

Changes example code to accept an `AbstractControl` instead of `FormGroup` in
`identityRevealedValidator` function.

Closes #40131.

PR Close #40132
This commit is contained in:
Bill Ludwig 2020-12-15 08:38:55 -07:00 committed by atscott
parent 49dcb06dca
commit 5013a7e12d
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ import { AbstractControl, FormGroup, NG_VALIDATORS, ValidationErrors, Validator,
// #docregion cross-validation-validator
/** A hero's name can't match the hero's alter ego */
export const identityRevealedValidator: ValidatorFn = (control: FormGroup): ValidationErrors | null => {
export const identityRevealedValidator: ValidatorFn = (control: AbstractControl): ValidationErrors | null => {
const name = control.get('name');
const alterEgo = control.get('alterEgo');