angular2-json-schema-form
Version:
Angular 2 JSON Schema Form builder
53 lines (45 loc) • 1.55 kB
text/typescript
import { Component, Input, OnInit } from '@angular/core';
import { JsonSchemaFormService } from '../library/json-schema-form.service';
export class FieldsetComponent implements OnInit {
private options: any;
private expanded: boolean = true;
formID: number;
layoutNode: any;
layoutIndex: number[];
dataIndex: number[];
constructor(
private jsf: JsonSchemaFormService
) { }
ngOnInit() {
this.options = this.layoutNode.options;
this.expanded = !this.options.expandable;
}
private expand() {
if (this.options.expandable) { this.expanded = !this.expanded; }
}
}