@terminus/ngx-tools
Version:
[![CircleCI][circle-badge]][circle-link] [![codecov][codecov-badge]][codecov-project] [![semantic-release][semantic-release-badge]][semantic-release] [![MIT License][license-image]][license-url] <br> [![NPM version][npm-version-image]][npm-url] [![Github
14 lines (13 loc) • 463 B
TypeScript
import { FormGroup } from '@angular/forms';
/**
* Return the value of a FormControl within a FormGroup
*
* @param form - The FormGroup that contains the control
* @param controlName - The name of the control
* @returns The value
*
* @example
* getFormControlValue(myFormGroup, 'myControl');
* getFormControlValue<boolean>(myFormGroup, 'myControl');
*/
export declare function getFormControlValue<T>(form: FormGroup, controlName: string): T | undefined;