diff --git a/src/app/participant-text-content/participant-text-content.component.html b/src/app/participant-text-content/participant-text-content.component.html new file mode 100644 index 0000000000000000000000000000000000000000..19899bf42746a5b1ec6342da438e2952374cbdc3 --- /dev/null +++ b/src/app/participant-text-content/participant-text-content.component.html @@ -0,0 +1,9 @@ +<form (ngSubmit)="submit(answer.value)"> + <h1 class="mat-headline">{{ content.subject }}</h1> + <p>{{ content.body }}</p> + <mat-divider></mat-divider> + <mat-form-field> + <textarea matInput #answer placeholder="Your answer"></textarea> + </mat-form-field> + <button mat-button type="submit">Submit</button> +</form> diff --git a/src/app/participant-text-content/participant-text-content.component.scss b/src/app/participant-text-content/participant-text-content.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/app/participant-text-content/participant-text-content.component.spec.ts b/src/app/participant-text-content/participant-text-content.component.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..b1855b0d1641f97fd5bc391e0ec509c755389bad --- /dev/null +++ b/src/app/participant-text-content/participant-text-content.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ParticipantTextContentComponent } from './participant-text-content.component'; + +describe('ParticipantTextContentComponent', () => { + let component: ParticipantTextContentComponent; + let fixture: ComponentFixture<ParticipantTextContentComponent>; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ParticipantTextContentComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ParticipantTextContentComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/participant-text-content/participant-text-content.component.ts b/src/app/participant-text-content/participant-text-content.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..0cec24630e60fa318fe16603eee56ba6306617cd --- /dev/null +++ b/src/app/participant-text-content/participant-text-content.component.ts @@ -0,0 +1,27 @@ +import { Component, OnInit } from '@angular/core'; +import { TextContent } from '../text-content'; + +@Component({ + selector: 'app-participant-text-content', + templateUrl: './participant-text-content.component.html', + styleUrls: ['./participant-text-content.component.scss'] +}) +export class ParticipantTextContentComponent implements OnInit { + + content: TextContent = new TextContent('1', + '1', + '1', + 'Text Content 1', + 'This is the body of Text Content 1', + 1); + + constructor() { + } + + ngOnInit() { + } + + submit(answer: string) { + } + +}