@ng-stack/forms
Version:
> provides wrapped Angular's Reactive Forms to write its more strongly typed.
44 lines (43 loc) • 2.02 kB
TypeScript
import { ElementRef, Renderer2, EventEmitter } from '@angular/core';
import { ControlValueAccessor } from '@angular/forms';
import * as i0 from "@angular/core";
export declare class InputFileDirective implements ControlValueAccessor {
private elementRef;
private renderer;
private _multiple;
get multiple(): boolean | string | undefined;
set multiple(value: boolean | string | undefined);
preserveValue: boolean | string;
select: EventEmitter<File[]>;
private onChange;
private onTouched;
constructor(elementRef: ElementRef, renderer: Renderer2);
/**
* Callback function that should be called when
* the control's value changes in the UI.
*/
callOnChange(event: any): void;
/**
* Writes a new value to the element.
* This method will be called by the forms API to write
* to the view when programmatic (model -> view) changes are requested.
*
* See: [ControlValueAccessor](https://angular.io/api/forms/ControlValueAccessor#members)
*/
writeValue(fileList: FileList): void;
/**
* Registers a callback function that should be called when
* the control's value changes in the UI.
*
* This is called by the forms API on initialization so it can update
* the form model when values propagate from the view (view -> model).
*/
registerOnChange(fn: () => void): void;
/**
* Registers a callback function that should be called when the control receives a change event.
* This is called by the forms API on initialization so it can update the form model on change.
*/
registerOnTouched(fn: () => void): void;
static ɵfac: i0.ɵɵFactoryDeclaration<InputFileDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<InputFileDirective, " input[type=file][ngModel], input[type=file][formControl], input[type=file][formControlName]", never, { "multiple": "multiple"; "preserveValue": "preserveValue"; }, { "select": "select"; }, never, never, false>;
}