在RxJs 5中共享角HTTP网络调用结果的正确方法是什么?
getCustomer() { return this.http.get('/someUrl').map(res => res.json());}
let network$ = getCustomer();let subscriber1 = network$.subscribe(...);let subscriber2 = network$.subscribe(...);
getCustomer() { return this.http.get('/someUrl').map(res => res.json()).share();}
相关分类