Skip to content
Snippets Groups Projects
Commit fdbc2e86 authored by Lukas Mauß's avatar Lukas Mauß
Browse files

Remove unused component

parent 9030a27c
No related merge requests found
<mat-list>
<h3 mat-subheader>Answers</h3>
<mat-list-item *ngFor="let textAnswer of textAnswers">
<button mat-button routerLink="{{textAnswer.id}}">
{{textAnswer.body}}
</button>
</mat-list-item>
</mat-list>
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AnswersListComponent } from './answers-list.component';
describe('AnswersListComponent', () => {
let component: AnswersListComponent;
let fixture: ComponentFixture<AnswersListComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AnswersListComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AnswersListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import { ContentAnswerService } from '../../../services/http/content-answer.service';
import { AnswerText } from '../../../models/answer-text';
import { ActivatedRoute } from '@angular/router';
import { ContentService } from '../../../services/http/content.service';
@Component({
selector: 'app-answers-list',
templateUrl: './answers-list.component.html',
styleUrls: ['./answers-list.component.scss']
})
export class AnswersListComponent implements OnInit {
textAnswers: AnswerText[];
constructor(
private contentService: ContentService,
private contentAnswerService: ContentAnswerService,
private route: ActivatedRoute) {
}
ngOnInit() {
this.route.params.subscribe(params => {
this.getAnswerTexts(params['contentId']);
});
}
getAnswerTexts(contentId: string): void {
this.contentAnswerService.getAnswers(contentId)
.subscribe(textAnswers => {
this.textAnswers = textAnswers;
});
}
}
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { CreatorRoutingModule } from './creator-routing.module';
import { AnswersListComponent } from './answers-list/answers-list.component';
import { ContentChoiceCreatorComponent } from './content-choice-creator/content-choice-creator.component';
import { ContentCreatePageComponent } from './content-create-page/content-create-page.component';
import { ContentLikertCreatorComponent } from './content-likert-creator/content-likert-creator.component';
......@@ -40,7 +39,6 @@ import { ContentEditComponent } from './_dialogs/content-edit/content-edit.compo
})
],
declarations: [
AnswersListComponent,
ContentChoiceCreatorComponent,
ContentCreatePageComponent,
ContentLikertCreatorComponent,
......
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