I have some block of html in Angular that I would like fill out with some nested values of an observable, such as:
<div class="container" *ngIf="(myObservable$ | async) as myObservable">
<span>{{ myObservable.middleNest.value1 }}</span>
<span>{{ myObservable.middleNest.value2 }}</span>
</div>
Is there a way to define a variable in the container tags so that I am able to fetch the nested values via middleNest.value1 and middleNest.value2 (ensuring the path to middle nest is fully non-null)? It doesn't seem right to have to write the whole path to middle nest in the spans, given that in some cases the values could be deeply nested.