UNPKG

@ngx-uk-frontend/core

Version:

Core utilities and shared functionality for ngx-uk-frontend libraries

38 lines 1.79 kB
/* eslint-disable @typescript-eslint/no-empty-function */ /* eslint-disable @typescript-eslint/no-unused-vars */ import { Directive } from '@angular/core'; import { NG_VALUE_ACCESSOR } 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 class ValueAccessorDirective { writeValue(value) { } registerOnChange(fn) { } registerOnTouched(fn) { } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ValueAccessorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: ValueAccessorDirective, isStandalone: true, providers: [ { provide: NG_VALUE_ACCESSOR, multi: true, useExisting: ValueAccessorDirective, }, ], ngImport: i0 }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ValueAccessorDirective, decorators: [{ type: Directive, args: [{ providers: [ { provide: NG_VALUE_ACCESSOR, multi: true, useExisting: ValueAccessorDirective, }, ], }] }] }); //# sourceMappingURL=value-accessor.directive.js.map