UNPKG

@crnk/angular-ngrx

Version:

Angular helper library for ngrx-json-api and crnk:

21 lines (20 loc) 1.26 kB
import { EventEmitter, OnChanges, OnDestroy } from '@angular/core'; import { AsyncValidatorFn, ControlValueAccessor, Validator, ValidatorFn } from '@angular/forms'; import { Path } from '../crnk.expression'; import { CrnkControl } from './crnk.expression.form.model.base'; export declare class ExpressionDirective extends CrnkControl implements OnChanges, OnDestroy { pathModel: Path<any>; crnkExpressionChange: EventEmitter<{}>; /** * NOTE that in contract to NgModel we do not use @Host for parent. This would enforce that the * components are direct children of the forms component. TODO investigate whether there is * any better solutions (maybe something similar to FormGroup). It does not seem like it is possible * to expose an existing ControlContainer again with @Component.providers as it would lead to a circular * dependency (there is no provider for children only, but itself as well). */ constructor(validators: Array<Validator | ValidatorFn>, asyncValidators: Array<Validator | AsyncValidatorFn>, valueAccessors: ControlValueAccessor[]); ngOnDestroy(): void; protected _setUpControl(): void; private _setUpStandalone(); viewToModelUpdate(newValue: any): void; }