我正在尝试评估Angular 2,我遇到了observables的问题.
我试图创建一个简单的服务,最初返回硬编码数组,但最终将从Web服务获取数据.
但是,我无法让它构建好.
有任何想法吗?
export class FleetListService {
private data: Observable<Array<IFleet>>;
constructor() { }
fleets: IFleet[] = JSON.parse( `[{ "id": 1, "name": "John", "description": "John has been in the Audio/Video industry since 1990. He has led DevAv as its CEO since 2003. When not working hard as the CEO, John loves to golf and bowl. He once bowled a perfect game of 300.", "childCount": 5, "isUsed": true },
{ "id": 2, "name": "Olivia", "description": "Olivia loves to sell. She …Run Code Online (Sandbox Code Playgroud)