NG0303: Can‘t bind to ‘ngForOf‘ since it isn‘t a known property of ‘h2‘.

从后端获取的数据在用

  <h2 *ngFor="let item of list;let key=index"> 这是detail{{list}} </h2>

报了下面的错误:

NG0303: Can't bind to 'ngForOf' since it isn't a known property of 'h2'.

原因:你获取到的list用不到ngFor,直接用就行,比如:list.name

上一篇:0037-如何在Windows Server2008搭建DNS服务并配置泛域名解析


下一篇:配置树莓派中文环境 及解决 no write since last change