import { AbstractControl } from '@angular/forms' ; export function setEnabled ( control , enabled = true ) { if ( enabled ) { control . enable ( ) ; } else { control . disable ( ) ; } } export function setDisabled ( control , disabled = true ) { setEnabled ( control , ! disabled ) ; }