模板 TR 未显示,并生成错误:NG0303:无法绑定到“ngForOf”,因为它不是“tr”的已知属性。我不明白为什么。我在 Angular 11 和 navigator Chrone
控制台 html 中出现错误:
Run Code Online (Sandbox Code Playgroud)<div> <h1 class="module-title">Job logs</h1> <span class="sp-notice">the time zone is set on GMT</span> <div class="container"> <table class="table table-striped"> <thead> <tr> <th scope="col">#JobFirst</th> <th scope="col">Last start</th> <th scope="col">Last Finish</th> <th scope="col">Time</th> </tr> </thead> <tbody> <tr *ngFor="let item of jobs"> <th>{{ item.JobName }}</th> <td>{{ item.LastStartOperation }}</td> <td>{{ item.LastFinishOperation }}</td> <td>{{ item.Time }}</td> </tr> </tbody> </table> </div> </div>
这是文件 component.ts 的内容:
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-joblog',
templateUrl: './joblog.component.html', …Run Code Online (Sandbox Code Playgroud)