我試圖使用HTML標記來構建表格並在標題中出現錯誤。錯誤:模板解析錯誤:無法綁定到'ngForOf',因爲它不是'模板'的已知屬性
這裏是模板:
<template ngfor let-log [ngForOf]="logs">
<tr>
<td [lgStatus]="log.level" class="ion-record"></td>
<td>{{log.timestamp | date:'medium'}}</td>
<td>{{log.source}}</td>
<td>{{log.message}}</td>
</tr>
<tr>
<td colSpan="4">{{log.detailedMessage}}</td>
</tr>
</template>
我檢查了幾個線程和我正確導入在app.module.ts的BrowserModule和與此相關的模板組件CommonModule。
我不明白我做了什麼錯在這裏:(
在此先感謝您的幫助。 嗶嘰。
謝謝!浪費很多時間,因爲複製/粘貼錯誤:-( – LucasBrazi06