UNPKG

@crnk/angular-ngrx

Version:

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

39 lines (38 loc) 1.22 kB
import { ChangeDetectorRef, OnDestroy } from '@angular/core'; import { NgForm } from '@angular/forms'; import { Path } from '../expression/crnk.expression'; export interface ErrorEntry { code: string; data: any; } /** * Displays the errors of a control. The control instance is selected by passing its expression. */ export declare class ControlErrorsComponent implements OnDestroy { private form; private cd; private _expression; private control; private controlValueSubscription; private controlStatusSubscription; private formSubscription; controlErrors: Array<ErrorEntry>; template: any; constructor(form: NgForm, cd: ChangeDetectorRef); expression: Path<any>; ngOnDestroy(): void; private initControl(); private collectErrors(); } /** * Displays the errors for the given field for a resource. The field and resource is passed to this component * as expression. */ export declare class ResourceErrorsComponent { private cd; pathErrors: Array<ErrorEntry>; template: any; constructor(cd: ChangeDetectorRef); protected toPath(sourcePointer: string): string; expression: Path<any>; }