How can we use a ternary condition within the [selected] or [ngvalue] property of option in order to have a default selected option? For ex:
<input type="text" name="time">
<select class="form-control">
<option [selected]="{time > 12 ? 'PM' : 'AM'}">
</select>
This default option is dependent on the input typed. If the input typed in the field is above 12, then it should automatically select PM, else AM.
handle time with Hook State.Like const time =