2017-09-14 42 views

回答

2

您可以訂閱和檢查關參數。

let subscription = observable.subscribe(() => {}) 

if (!subscription.closed) { 
    //subscribed 
} else { 
    //not subscribed 
}