I have the following template that renders user details:
<ion-buttons end>
<button (click)="loadProfilePage()" ion-button clear item-end icon-right>{{ api.userData?.inventory?.points }}/
<p ion-text color="gold">{{ api.userData?.inventory?.credits }}</p>
<ion-icon name="contact"></ion-icon>
</button>
</ion-buttons>
So there is a provider (api) that is fetching this data at the app startup from local storage.
Currently I am using "?" signs to indicate that this evaluation should be "lazy" as data might not be yet there and api.userData can hence return undefined.
Question - is this a proper implementation or should I switch to observable and async pipe?
It feels like what I have right now works, but I am not sure if this approach with ? is exaclty how it should work for data binding to variables who are obtaining their value at the app start form async source (local persistence)
[disabled]=" api.userData", and you should keep?.. Should it not exist? Use ngIf, and you can omit?..