
<div *ngIf="comment">
    <h2><span jhiTranslate="baeldungApp.comment.detail.title">Comment</span> {{comment.id}}</h2>
    <hr>
    <jhi-alert-error></jhi-alert-error>
    <dl class="row-md jh-entity-details">
        <dt><span jhiTranslate="baeldungApp.comment.text">Text</span></dt>
        <dd>
            <span>{{comment.text}}</span>
        </dd>
        <dt><span jhiTranslate="baeldungApp.comment.creationDate">Creation Date</span></dt>
        <dd>
            <span>{{comment.creationDate | date:'mediumDate'}}</span>
        </dd>
        <dt><span jhiTranslate="baeldungApp.comment.post">Post</span></dt>
        <dd>
            <div *ngIf="comment.post">
                <a [routerLink]="['/post', comment.post?.id]">{{comment.post?.title}}</a>
            </div>
        </dd>
    </dl>

    <button type="submit"
            (click)="previousState()"
            class="btn btn-info">
        <span class="fa fa-arrow-left"></span>&nbsp;<span jhiTranslate="entity.action.back"> Back</span>
    </button>

    <button type="button"
            [routerLink]="['/', { outlets: { popup: 'comment/'+ comment.id + '/edit'} }]"
            replaceUrl="true"
            class="btn btn-primary">
        <span class="fa fa-pencil"></span>&nbsp;<span jhiTranslate="entity.action.edit"> Edit</span>
    </button>
</div>
