I want my Dropdown list to show/hide Div based on the value selected
I have a dropdown list and several Div in my angular project as shown in the code
<div class="col-md-12 no-padding">
<label>Reply Type</label>
<select class="form-control select2" formControlName="replytype" type="text" style="width: 100%;">
<option value="predefined">Predefined</option>
<option value="opentype">Open Type</option>
</select>
</div>
Div1
<div class="col-md-12 no-padding">
<label>Application Name</label>
<input type="text" formControlName="applicationname" class="form-control" id="applicationname" placeholder="Application Name">
<span class="text-danger" *ngIf="form.controls['applicationname'].touched && form.controls['applicationname'].hasError('required')">
Application Name is required! </span>
</div>
Div2
<div class="col-md-12 no-padding">
<label>Main Menu</label>
<input type="text"class="form-control" id="mainmenu" placeholder="Message Text">
</div>
If the selected value is predefined then Div1 is visible and Div2 is hidden, but if it is opentype then Div2 is visible and Div1 is hidden.
By default, the Div1 value should be opentype and Div2 should be visible