File

projects/isy-angular-widgets/src/lib/pipes/form-control.pipe.ts

Metadata

Methods

transform
transform(value: AbstractControl)
Parameters :
Name Type Optional
value AbstractControl No
Returns : FormControl
import {Pipe, PipeTransform} from '@angular/core';
import {AbstractControl, FormControl} from '@angular/forms';

@Pipe({
  name: 'formControl'
})
export class FormControlPipe implements PipeTransform {
  /*
   * Transforms the input value (AbstractControl) into a FormControl.
   *
   * @param value An instance of AbstractControl, which is the parent type for form controls in Angular.
   * @return The input value cast as a FormControl, allowing access to FormControl properties and methods.
   */
  transform(value: AbstractControl): FormControl {
    return value as FormControl;
  }
}

results matching ""

    No results matching ""