Is it possible to cancel my loading spinner if my RxJs function returns no data? All the solutions I've seen online seem to rely on waiting for e.g. 10 seconds and if there's no data, replacing the spinner with an alternate message. But some of our clients have low internet speeds, so they see the "You have no data" message, and then a few seconds later some data finally comes through and the message is replaced.

Edited to add a super-minimal example:

component.ts

```
  myObservable$;

  ngOnInit(): void {
    const myArray = [1, 2, 3, 4];
    // const myArray = [];

    this.myObservable$ = from(myArray).pipe(
      bufferCount(10),
      concatMap((item) => of(item).pipe(delay(3000)))
    );
  }

```

component.html

```
<div *ngIf="myObservable$ | async as myObservable; else spinner">
  <div *ngFor="let item of myObservable">item: {{ item }}</div>
</div>
<ng-template #spinner>
  Spinner
</ng-template>

```

Note that if I comment out `const myArray = [1, 2, 3, 4];` and uncomment `const myArray = [];` so that my data stream is empty, the word "Spinner" stays on the screen forever. If my observable is empty, I would like the spinner to disappear and be replaced by a message saying "No data".

My real observable is a pipe that derives from getting a Firebase collection.