I can display a value produced by an Observable using {status_async | async}
in html.
However, how can I test whether this Observable is equal to something?
Specifically, I'd like to use it to assign a class:
<div [ngClass]="{'has-danger': status_async == 'created before'}">
<input type="text">
</div>
I discovered that I can use:
<div [ngClass]="{'has-danger': (status_async | async) == 'created before'}">
But then the issue becomes that I have used async twice (here and for displaying the value).
As I'm checking the status of a succesful creation, ironically after the second async the value changes to 'created before', even when I clicked my create button only once.
How can I solve this issue?