UNPKG

@ionic/angular

Version:

Angular specific wrappers for @ionic/core

26 lines 1.64 kB
import { Directive, forwardRef } from '@angular/core'; import { MaxValidator, NG_VALIDATORS } from '@angular/forms'; import * as i0 from "@angular/core"; /** * @description * Provider which adds `MaxValidator` to the `NG_VALIDATORS` multi-provider list. */ export const ION_MAX_VALIDATOR = { provide: NG_VALIDATORS, useExisting: forwardRef(() => IonMaxValidator), multi: true, }; export class IonMaxValidator extends MaxValidator { /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: IonMaxValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive }); /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.0", type: IonMaxValidator, isStandalone: false, selector: "ion-input[type=number][max][formControlName],ion-input[type=number][max][formControl],ion-input[type=number][max][ngModel]", host: { properties: { "attr.max": "enabled(max) ? max : null" } }, providers: [ION_MAX_VALIDATOR], usesInheritance: true, ngImport: i0 }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: IonMaxValidator, decorators: [{ type: Directive, args: [{ standalone: false, selector: 'ion-input[type=number][max][formControlName],ion-input[type=number][max][formControl],ion-input[type=number][max][ngModel]', providers: [ION_MAX_VALIDATOR], host: { '[attr.max]': 'enabled(max) ? max : null' }, }] }] }); //# sourceMappingURL=max-validator.js.map