我正在使用 Angular 5,并使用 subscribe() 方法订阅了一个可观察对象。我想知道仅调用订阅的 unsubscribe() 方法是否足以清理所有内容,或者我还应该调用 remove() 方法?
代码片段:
`
代码片段:
`
// somewhere in a method
this.s1 = someObservable.subscribe((value) => {
//somecode
});
// in ngOnDestroy
this.s1.unsubscribe(); // should I also call .remove()
`