First custom Dynamic Form Module generation
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Component } from '@angular/core';
|
||||
import {QuestionInterface} from './modules/dyn-form/types/question.interface';
|
||||
|
||||
@Component({
|
||||
selector: 'my-app',
|
||||
@@ -9,4 +10,25 @@ export class AppComponent {
|
||||
public resultCounter = 10;
|
||||
public resultTag = {"alpha": true, "beta": false};
|
||||
public resultTag2 = {"alpha": true, "beta": false};
|
||||
|
||||
public formQuestions: QuestionInterface[] = [
|
||||
{
|
||||
type: "flag",
|
||||
description: "This is a help tooltip",
|
||||
properties: {
|
||||
key: "flags",
|
||||
label: "Form Type Flags",
|
||||
order: 1,
|
||||
|
||||
// dropdown && flags
|
||||
options: [{key: "alpha", value: "A"}, {key: "beta", value: "B"}]
|
||||
}, constraints: {
|
||||
optional: true
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
submit(value: any) {
|
||||
console.log("send", value);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user