小编Vla*_*dam的帖子

Angular11 - NG0303:无法绑定到“ngForOf”,因为它不是“tr”的已知属性

模板 TR 未显示,并生成错误:NG0303:无法绑定到“ngForOf”,因为它不是“tr”的已知属性。我不明白为什么。我在 Angular 11 和 navigator Chrone

控制台 html 中出现错误:

    <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>
Run Code Online (Sandbox Code Playgroud)

这是文件 component.ts 的内容:

import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-joblog',
  templateUrl: './joblog.component.html', …
Run Code Online (Sandbox Code Playgroud)

angular angular11

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

angular ×1

angular11 ×1