diff --git a/src/app/comment/comment.component.html b/src/app/comment/comment.component.html index 222b106fc70a1924d2b4ca26ad4fac61e4acab7c..749e1fdf6276cde48d4fb5dc583824fb69d30f23 100644 --- a/src/app/comment/comment.component.html +++ b/src/app/comment/comment.component.html @@ -1,14 +1,14 @@ <ol class ="ol"> - <li> + <li *ngFor="let comment of comments"> <mat-card> <mat-card-content> - <b> <!-- insert subject of comment --> </b><br> + <b>{{comment.subject}}</b><br> - <!-- insert comment --> + {{comment.body}} </mat-card-content> <mat-card-footer> <div class="date"> - <i> <!-- insert date of comment --> </i> + <i> {{comment.creationTimestamp}} </i> </div> </mat-card-footer> </mat-card><br> diff --git a/src/app/comment/comment.component.ts b/src/app/comment/comment.component.ts index 0d47e825d4e55f6c6e68180b96b3b83a32b75270..e895b868b73302baedccd2ddbb9a100ddb4519d3 100644 --- a/src/app/comment/comment.component.ts +++ b/src/app/comment/comment.component.ts @@ -1,4 +1,5 @@ import { Component, OnInit } from '@angular/core'; +import { Comment } from '../comment'; @Component({ selector: 'app-comment', @@ -6,6 +7,7 @@ import { Component, OnInit } from '@angular/core'; styleUrls: ['./comment.component.scss'] }) export class CommentComponent implements OnInit { + comments: Comment[]; constructor() { }