I have a problem where my view will not change when I update my variable in my observable subscription. I am trying to show a loading spinner while I wait for a response fro
You can also try this solution: Guide from Thoughtram
Short version:
import { ChangeDetectorRef } from '@angular/core';
...
constructor(private cd: ChangeDetectorRef) {}
...
... .subscribe( () => {
this.cd.markForCheck();
}
and you are good.
Background: when changing a value via .subscribe() angular does not notify that it should run changedetection. So you need to run it yourself.