While some may find this basic, I am currently trying to figure it out.
I came across another post discussing ngIf else conditionals with templates: How to use *ngIf else?.
<div *ngIf="isValid;then content else other_content">here is ignored</div>
<ng-template #content>content here...</ng-template>
<ng-template #other_content>other content here...</ng-template>
My question revolves around how the template can interpret the condition and its value.
For example, using someObj.someProperty It should display the property if it exists, otherwise show a text message.
<div *ngIf="someObj.someProperty;then content else other_content">here is ignored</div>
<ng-template #content>someObj.someProperty</ng-template>
<ng-template #other_content>not specified</ng-template>
Just for your information: I'm utilizing https://stackblitz.com/
One might wonder why I choose to use that instead of my desktop environment.
The answer is simple - my machine is restricted, and I am currently seeking admin rights to install necessary software. So, in the meantime, I am learning coding basics with notepad and are unable to run any code.