其他分享
首页 > 其他分享> > NG0303: Can‘t bind to ‘ngForOf‘ since it isn‘t a known property of ‘h2‘.

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

标签:NG0303,ngForOf,h2,since,list,known,property
来源: https://blog.csdn.net/m0_46270930/article/details/119272915