UNPKG

axiom-form

Version:

Dynamic form component with a custom decorator

39 lines (38 loc) 1.13 kB
import { OnInit } from '@angular/core'; import { FormGroup, AbstractControlOptions } from '@angular/forms'; import { AxFormService } from '../services/ax-form.service'; export interface AxForm { axForms: { [key: string]: FormGroup; }; } export interface ngFormCollectionItem { name: string; form: FormGroup; } export interface AxFormDecoratorConfig { [key: string]: { [key: string]: any; }; options?: AbstractControlOptions | { [key: string]: any; } | null; } export declare function AxForm(forms: AxFormDecoratorConfig): (constructor: Function) => void; export interface AxFormConfiguration { axAutoDisableSubmit?: boolean; axShowErrors?: boolean; } export declare class AxFormComponent implements OnInit { _formService: AxFormService; form: FormGroup; axAutoDisableSubmit: boolean; axShowErrors: boolean; submitted: boolean; errors: string[]; private _axAutoDisableSubmit; private _axShowErrors; constructor(_formService: AxFormService); ngOnInit(): void; private setConfig; }