Mico Form Component

Component Usage

@Input() modelUrl: string

A string identifying the jsonschema model to use. Example: local/servicePOST

@Input() filter: string[] = []

A list of properties to filter by.

@Input() isBlacklist: boolean = false

If property filter is whitelist or blacklist.

@Input() debug: boolean = false

If form renders debug data.

@Output() valid: EventEmitter<boolean>

If form is valid.

@Output() data: EventEmitter<any>

Form data as js object.

Example Usage

<mico-form [modelUrl]="'local/servicePOST'" [filter]="['name']" (data)="data = $event"></mico-form>

Class

class MicoFormComponent()

exported from src/app/forms/mico-form/mico-form.component

Implements:
  • OnInit()
  • OnChanges()

Dynamic form component that renders a form from the given modelUrl.

MicoFormComponent._startData

type: <TODO>

MicoFormComponent.data

type: EventEmitter

MicoFormComponent.debug

type: boolean

MicoFormComponent.filter

type: string[]

MicoFormComponent.form

type: FormGroup

MicoFormComponent.formGroup

type: src/app/forms/form-group.service.FormGroupService

MicoFormComponent.formSubscription

type: Subscription

MicoFormComponent.isBlacklist

type: boolean

MicoFormComponent.model

type: src/app/api/apimodel.ApiModel

MicoFormComponent.modelUrl

type: string

MicoFormComponent.models

type: src/app/api/models.service.ModelsService

MicoFormComponent.new MicoFormComponent(models, formGroup)
Arguments:
  • models (src/app/api/models.service.ModelsService) –
  • formGroup (src/app/forms/form-group.service.FormGroupService) –
Returns:

src/app/forms/mico-form/mico-form.component.MicoFormComponent

MicoFormComponent.ngOnChanges(changes)
Arguments:
  • changes (SimpleChanges) –
MicoFormComponent.ngOnInit()
MicoFormComponent.onlyRequired

type: boolean

MicoFormComponent.properties

type: src/app/api/apimodel.ApiModel | src/app/api/apimodel.ApiModelRef[]

MicoFormComponent.startData

type: <TODO>

MicoFormComponent.trackByFn(index, item)
Arguments:
  • index (any) –
  • item (any) –
Returns:

any

MicoFormComponent.valid

type: EventEmitter