angular-ru-sdk icon indicating copy to clipboard operation
angular-ru-sdk copied to clipboard

🚀 - Replace with outsideZone

Open splincode opened this issue 2 years ago • 0 comments

Which @angular-ru/* package(s) are relevant/releated to the feature request?

cdk

Description

export function outsideZone<T>(zone: NgZone) {
  return function(source: Observable<T>) {
    return new Observable(observer => {
      let sub: Subscription | null = null;
      
      zone.runOutsideAngular(() => {
        sub = source.subscribe(observer);
      });

      return sub;
    });
  };
}

splincode avatar Dec 09 '21 12:12 splincode