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 22739a9dca4039f50811888566b3bf6fc6ff1c3e..926b9a4a564a80c22be722bd06045cbea4c6da40 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 = ''; + } }