First custom Dynamic Form Module generation

This commit is contained in:
Sebastian Seedorf
2017-05-30 09:10:38 +02:00
parent a5fdfa32d2
commit 48b4f67b06
13 changed files with 293 additions and 248 deletions

View File

@@ -0,0 +1,29 @@
import { Injectable } from '@angular/core';
import {HttpCachedService} from '../../../services/http-cached.service';
import {QuestionInterface} from '../types/question.interface';
@Injectable()
export class QuestionService {
constructor(private httpCachedService: HttpCachedService) {
}
public getQuestions(cb: (res: QuestionInterface[], err: any) => void) {
setTimeout(() => cb([
{
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
}
}
], null), 4000);
}
}