从后端获取的数据在用
<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
2023-11-09 17:44:22
从后端获取的数据在用
<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