Skip to content
Snippets Groups Projects
Verified Commit f7fce1dd authored by Thomas Lenz's avatar Thomas Lenz Committed by Lukas Maximilian Kimpel
Browse files

Implement fake-data in component.ts

parent fad66cde
Branches
Tags
1 merge request!89Resolve "content types (HTML)"
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 = '';
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment