ngx-mat-errors
Version:
NgxMatErrors provides an easy, yet flexible solution for displaying error messages in a MatFormField.
24 lines (23 loc) • 1.36 kB
TypeScript
import { InjectionToken, type OnDestroy, type QueryList } from '@angular/core';
import { type Observable } from 'rxjs';
import { type INgxMatErrorDef } from './ngx-mat-error-def.directive';
import type { ErrorMessages, ErrorTemplate, NgxMatErrorControls } from './types';
import * as i0 from "@angular/core";
export declare const NGX_MAT_ERROR_DEFAULT_OPTIONS: InjectionToken<ErrorMessages | Observable<ErrorMessages>>;
export declare class NgxMatErrors implements OnDestroy {
private readonly messages$;
private readonly defaultControl;
private readonly controlChangedSubject;
protected error$: Observable<ErrorTemplate>;
protected set customErrorMessages(queryList: QueryList<INgxMatErrorDef>);
/**
* @deprecated will be changed to a signal and it won't be possible to set the property from TS.
* Instead of setting it in a directive, the directive should extend the {@link NgxMatErrorControl } class
* and provide itself as it.
*/
set control(control: NgxMatErrorControls);
/** @ignore */
ngOnDestroy(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatErrors, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatErrors, "ngx-mat-errors, [ngx-mat-errors]", never, { "control": { "alias": "ngx-mat-errors"; "required": false; }; }, {}, ["customErrorMessages"], never, true, never>;
}