I am new to Angular and I'm sure this is a pretty basic question but I want to display a list of Symptoms matching a specific SymptomID. I have the following code which checks if the specific symptom is of a specific type but when the type is not correct, the code still outputs a blank bullet in its place.
<h1>Symptoms</h1>
<h2> {{symptomtypes[0].Description}}</h2>
<li *ngFor="let symptom of symptoms">
<p *ngIf="(symptom.SymptomTypeID == 1)"> {{symptom.Description}}</p>
</li>
<h2> {{symptomtypes[1].Description}}</h2>
<li *ngFor="let symptom of symptoms">
<p *ngIf="(symptom.SymptomTypeID == 2)"> {{symptom.Description}}</p>
</li>
<h2> {{symptomtypes[2].Description}}</h2>
<li *ngFor="let symptom of symptoms">
<p *ngIf="(symptom.SymptomTypeID == 3)"> {{symptom.Description}}</p>
</li>
I expect the list to output as follows:
Symptom Type 1
- Symptom Type 1
- Symptom Type 1
Symptom Type 1
Symptom Type 2Symptom Type 2
- Symptom Type 2
Symptom Type 2
Symptom Type 3Symptom Type 3
- Symptom Type 3
Symptom Type 3
But instead I get something like:
Symptom Type 1Blank
- Blank
Symptom Type 1
Symptom Type 2Symptom Type 2
- Blank
Symptom Type 2
Symptom Type 3Symptom Type 3
- Blank
- Blank