In my AngularJS template, I have the code snippet below:
<input
type="number"
id="exercise-log-duration-hours-{{ ::$id }}"
class="form-control"
ng-model="$ctrl.workoutHours"
ng-change="$ctrl.updateHours($ctrl.workoutHours)"
name="{{ ::$ctrl.inputName }}"
step="1"
min="1"
required>
</input>
I am looking to provide users with a dropdown selection of options:
ctrl.hourOptions = [1, 2, 3, 4, 5, 6];
This is defined in the corresponding component file.
Initially, I planned to use ui-select for this purpose. However, after considering the user's need to input custom values not included in the dropdown list, this approach seems impractical.