fuse-angular/src/app/modules/admin/ui/forms/fields/fields.component.ts
2022-11-11 15:30:12 +03:00

36 lines
1.2 KiB
TypeScript

import { Component, ViewEncapsulation } from '@angular/core';
import { FormControl, UntypedFormBuilder, Validators } from '@angular/forms';
@Component({
selector : 'forms-fields',
templateUrl : './fields.component.html',
encapsulation: ViewEncapsulation.None
})
export class FormsFieldsComponent
{
formFieldHelpers: string[] = [''];
fixedSubscriptInput: FormControl = new FormControl('', [Validators.required]);
dynamicSubscriptInput: FormControl = new FormControl('', [Validators.required]);
fixedSubscriptInputWithHint: FormControl = new FormControl('', [Validators.required]);
dynamicSubscriptInputWithHint: FormControl = new FormControl('', [Validators.required]);
/**
* Constructor
*/
constructor(private _formBuilder: UntypedFormBuilder)
{
}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
/**
* Get the form field helpers as string
*/
getFormFieldHelpersAsString(): string
{
return this.formFieldHelpers.join(' ');
}
}