Files
angulardynformmodule/src/app/modules/dyn-form/services/question.service.ts
2017-05-30 09:10:38 +02:00

29 lines
782 B
TypeScript

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);
}
}