import { Component, OnInit, OnDestroy } from '@angular/core'; import { Subject } from 'rxjs'; @Component({ selector: 'rtl-peer-swaps-out', templateUrl: './swaps-out.component.html', styleUrls: ['./swaps-out.component.scss'], }) export class PeerswapsOutComponent implements OnInit, OnDestroy { private unSubs: Array> = [new Subject(), new Subject(), new Subject(), new Subject()]; constructor() {} ngOnInit() { } ngOnDestroy() { this.unSubs.forEach((completeSub) => { completeSub.next(null); completeSub.complete(); }); } }