|
@@ -1,5 +1,5 @@
|
|
|
import { Component, OnInit, OnChanges, ViewChild, TemplateRef } from '@angular/core';
|
|
|
-import { FormGroup } from '@angular/forms';
|
|
|
+import { FormGroup, FormArray, FormControl } from '@angular/forms';
|
|
|
import { DynaformService } from './dynaform';
|
|
|
|
|
|
import * as test1 from './_mock/testfields.v1';
|
|
@@ -19,8 +19,10 @@ import * as test14 from './_mock/testfields.v14';
|
|
|
import * as test15 from './_mock/testfields.v15';
|
|
|
import * as test16 from './_mock/testfields.v16';
|
|
|
import * as test17 from './_mock/testfields.v17';
|
|
|
+import * as test18 from './_mock/testfields.v18';
|
|
|
+import * as test19 from './_mock/testfields.v19';
|
|
|
|
|
|
-const testdata = [ test1, test2, test3, test4, test5, test6, test7, test8, test9, test10, test11, test12, test13, test14, test15, test16, test17 ];
|
|
|
+const testdata = [ test1, test2, test3, test4, test5, test6, test7, test8, test9, test10, test11, test12, test13, test14, test15, test16, test17, test18, test19 ];
|
|
|
|
|
|
const defatltTest = 1;
|
|
|
|
|
@@ -121,6 +123,11 @@ export class AppComponent implements OnInit, OnChanges {
|
|
|
const dynaformdata = this.dynaform.build({}, newMeta, true);
|
|
|
const { form, meta } = dynaformdata;
|
|
|
this.meta = meta;
|
|
|
+ // Traverse form adding and removing controls as neccesary
|
|
|
+ // Do it manually first
|
|
|
+ // const testFieldFA = this.form.get('testField') as FormArray;
|
|
|
+ // console.log(testFieldFA);
|
|
|
+ // testFieldFA.push(new FormControl());
|
|
|
}
|
|
|
}
|
|
|
|