【发布时间】:2018-01-19 17:47:05
【问题描述】:
我有以下模板:
*ngFor="let contact of contacts | async"
地点:
contacts: Observable<any>;
我收到此错误:
ERROR Error: Cannot find a differ supporting object '[object Object]'
of type 'object'. NgFor only supports binding to Iterables such as Arrays.
为什么 ngFor 异步管道需要 Observable<any[]> 而不是 Observable<T>?
【问题讨论】:
-
你是如何获取
contacts的?