1 import { Component, EventEmitter, Input, Output } from '@angular/core'
2 import { ValidationConfiguration } from "app/models";
3 import { FormControl, Validators } from '@angular/forms';
5 export interface UiElementBaseInterface {
13 export class UiElementBase {
15 protected validation = ValidationConfiguration.validation;
16 protected control: FormControl;
18 // Two way binding for value (need to write the "Change" word like this)
19 @Output('valueChange') baseEmitter: EventEmitter<string> = new EventEmitter<any>();
20 @Input('value') set setValueValue(value) {
24 protected name: string;
25 protected type: string;
27 protected pattern: any;
28 protected readonly:boolean;
31 //this.control = new FormControl('', [Validators.required]);
32 this.control = new FormControl('', []);