@ngx-uk-frontend/core
Version:
Core utilities and shared functionality for ngx-uk-frontend libraries
17 lines (16 loc) • 873 B
TypeScript
import { ControlValueAccessor } from '@angular/forms';
import * as i0 from "@angular/core";
/**
* A standalone directive that implements ControlValueAccessor.
* This directive is used to create custom form controls that work seamlessly with Angular's forms.
*
* It provides itself as a NG_VALUE_ACCESSOR, allowing it to be used in form controls.
* The multi: true option allows multiple value accessors to be registered for a single form control.
*/
export declare class ValueAccessorDirective implements ControlValueAccessor {
writeValue(value: unknown): void;
registerOnChange(fn: (value: unknown) => void): void;
registerOnTouched(fn: () => void): void;
static ɵfac: i0.ɵɵFactoryDeclaration<ValueAccessorDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<ValueAccessorDirective, never, never, {}, {}, never, never, true, never>;
}