noydb/oworms-ui

View on GitHub
src/app/component/word/card/word-card.component.html

Summary

Maintainability
Test Coverage
<div (click)="viewWordDetails()" *ngIf="word" title="view this word's details">

    <ow-word-like [word]="word"/>
    <h5 class="mono" [title]="word.theWord">{{ word.theWord }}</h5>

    <!-- basics -->
    <span id="pronunciation" *ngIf="word.pronunciation as pronunciation;">{{ pronunciation }}</span>
    <span id="part-of-speech">{{ word.partOfSpeech }}</span>
    <span id="definition">{{ word.definition }}</span>

    <!-- meta data -->
    <div>
        <span>{{ getViews(word) }}</span>
        <span>by {{ word.createdBy }}</span>
    </div>
    <div>
        <span>{{ word.creationDate | date : 'dd MMMM yyyy HH:mm:ss' }}</span>
    </div>

</div>