2017-12-17 16 views

답변

0

가장 간단한 방법은 필요한 데이터를 확보 한 후 수신 거부하는 것입니다.

let tempSubscription: Subscription = this.callReturningObservable(params) 
       .subscribe(item => { 
       tempSubscription.unsubscribe(); 
       tempSubscription = null;  // don't need this anymore 
       this.storeTheItem = item; 
       }, error => { 
       console.error("Error: " + error.message); 
       });