From f7fce1dd0cb1e4ac802495cc978e4b692b48ebd2 Mon Sep 17 00:00:00 2001
From: Thomas Lenz <Thomas.Lenz@mni.thm.de>
Date: Thu, 15 Mar 2018 12:49:27 +0100
Subject: [PATCH] Implement fake-data in component.ts

---
 .../creator-choice-content.component.ts           | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/src/app/creator-choice-content/creator-choice-content.component.ts b/src/app/creator-choice-content/creator-choice-content.component.ts
index 22739a9dc..926b9a4a5 100644
--- a/src/app/creator-choice-content/creator-choice-content.component.ts
+++ b/src/app/creator-choice-content/creator-choice-content.component.ts
@@ -1,4 +1,5 @@
 import { Component, OnInit } from '@angular/core';
+import { AnswerOption } from '../answer-option';
 
 @Component({
   selector: 'app-creator-choice-content',
@@ -6,10 +7,24 @@ import { Component, OnInit } from '@angular/core';
   styleUrls: ['./creator-choice-content.component.scss']
 })
 export class CreatorChoiceContentComponent implements OnInit {
+  subject = 'TestSubject';
+  body = 'TestBody';
+  newLabel: string;
+  newPoints: string;
+  options = [
+    new AnswerOption('A - Giraffe', '0'),
+    new AnswerOption('B - Bär', '0'),
+    new AnswerOption('C - bra', '10')
+    ];
 
   constructor() { }
 
   ngOnInit() {
   }
 
+  addAnswer() {
+    this.options.push(new AnswerOption(this.newLabel, this.newPoints));
+    this.newLabel = '';
+    this.newPoints = '';
+  }
 }
-- 
GitLab