diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 4fa276da2ca34157f2dd8753015c8c9f0d20b69c..7e8c2ec265b9194a6c0c47902201d7c5005a9af9 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -10,6 +10,7 @@ import { AuthenticationGuard } from './authentication.guard'; import { UserRole } from './user-roles.enum'; import { ParticipantRoomComponent } from './participant-room/participant-room.component'; import { CommentComponent } from './comment/comment.component'; +import { CommentListComponent } from './comment-list/comment-list.component'; const routes: Routes = [ { path: '', redirectTo: '/home', pathMatch: 'full' }, @@ -33,7 +34,7 @@ const routes: Routes = [ }, { path: 'room/:roomId/comments', - component: CommentComponent, + component: CommentListComponent, canActivate: [AuthenticationGuard], data: { roles: [UserRole.CREATOR] } }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 0cab4d5af7e70c731fe529d53bebd9511046f9ac..da1505c24a1e153e66a0b8aeda0e9b1e345d1ad5 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -8,7 +8,7 @@ import { JoinRoomComponent } from './join-room/join-room.component'; import { LoginComponent } from './login/login.component'; import { RegisterComponent } from './register/register.component'; import { PasswordResetComponent } from './password-reset/password-reset.component'; -import { CommentComponent } from './comment/comment.component'; +import { CommentListComponent } from './comment-list/comment-list.component'; import { AppRoutingModule } from './app-routing.module'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; @@ -85,7 +85,7 @@ import { DataStoreService } from './data-store.service'; CreatorHomeScreenComponent, CreateCommentComponent, ParticipantHomeScreenComponent, - CommentComponent, + CommentListComponent, ContentAnswersComponent, ParticipantRoomComponent ], diff --git a/src/app/comment/comment.component.html b/src/app/comment-list/comment-list.component.html similarity index 100% rename from src/app/comment/comment.component.html rename to src/app/comment-list/comment-list.component.html diff --git a/src/app/comment/comment.component.scss b/src/app/comment-list/comment-list.component.scss similarity index 100% rename from src/app/comment/comment.component.scss rename to src/app/comment-list/comment-list.component.scss diff --git a/src/app/comment/comment.component.spec.ts b/src/app/comment-list/comment-list.component.spec.ts similarity index 53% rename from src/app/comment/comment.component.spec.ts rename to src/app/comment-list/comment-list.component.spec.ts index bcac3f25f13c3e3be6e4741ef17af9dcc8e4accf..6c21dc4854e72b2e06a04fb8e7217a5f73de7ae2 100644 --- a/src/app/comment/comment.component.spec.ts +++ b/src/app/comment-list/comment-list.component.spec.ts @@ -1,20 +1,20 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { CommentComponent } from './comment.component'; +import { CommentListComponent } from './comment-list.component'; -describe('CommentComponent', () => { - let component: CommentComponent; - let fixture: ComponentFixture<CommentComponent>; +describe('CommentListComponent', () => { + let component: CommentListComponent; + let fixture: ComponentFixture<CommentListComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ CommentComponent ] + declarations: [ CommentListComponent ] }) .compileComponents(); })); beforeEach(() => { - fixture = TestBed.createComponent(CommentComponent); + fixture = TestBed.createComponent(CommentListComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/src/app/comment/comment.component.ts b/src/app/comment-list/comment-list.component.ts similarity index 88% rename from src/app/comment/comment.component.ts rename to src/app/comment-list/comment-list.component.ts index a68751c8f422c9bc862cea360e83d609b4928618..a52543e6ac5410ac4c3ca187c196060442ee36c5 100644 --- a/src/app/comment/comment.component.ts +++ b/src/app/comment-list/comment-list.component.ts @@ -7,11 +7,11 @@ import { RoomService } from '../room.service'; import { NotificationService } from '../notification.service'; @Component({ - selector: 'app-comment', - templateUrl: './comment.component.html', - styleUrls: ['./comment.component.scss'] + selector: 'app-comment-list', + templateUrl: './comment-list.component.html', + styleUrls: ['./comment-list.component.scss'] }) -export class CommentComponent implements OnInit { +export class CommentListComponent implements OnInit { comments: Comment[]; constructor(