mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-04-12 03:21:37 +00:00
36 lines
1.2 KiB
TypeScript
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(' ');
|
|
}
|
|
}
|