How to use the @datorama/akita.coerceArray function in @datorama/akita

To help you get started, we’ve selected a few @datorama/akita examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github datorama / akita / angular / playground / projects / ng-forms-manager / src / lib / forms-manager.ts View on Github external
export function setValidators(control: AbstractControl, validator: ValidatorFn | ValidatorFn[] | null) {
  control.setValidators(coerceArray(validator));
  control.updateValueAndValidity();
}
github datorama / akita / angular / playground / projects / ng-forms-manager / src / lib / forms-manager.ts View on Github external
export function setAsyncValidators(control: AbstractControl, validator: AsyncValidatorFn | AsyncValidatorFn[] | null) {
  control.setValidators(coerceArray(validator));
  control.updateValueAndValidity();
}