I am using *ngIf statement but getting an issue in it: The else part does not execute. I don't know why, here is the source code.
<form [formGroup]="reviewForm" (ngSubmit)="onSubmit()">
<div formArrayName="controlArray">
<div class="form-group"
*ngFor="let control of reviewForm.get('controlArray').controls; let i = index">
{{control.value}}
<span *ngIf="control.value!='dropdown';else addDropDown">
<input type="{{control.value}}"
class="form-control"
[formControlName]="i" />
<ng-template #addDropDown>
<p>hello world</p>
<select class="form-control"
[formControlName]="i">
</select>
</ng-template>
</span>
</div>
</div>
</form>
Please help, thanks.