I have an array
terms = [5,10,15,20,25]
and I'm trying to use ng-options in a select statement
<select ng-model="myNumbers" ng-options="term + ' years' as term for term in terms">
which produces
<option value="?"></option>
<option value="5">5</option>
<option value="10">10</option>
<option value="15">15</option>
<option value="20">20</option>
<option value="25">25</option>
What I want it to produce is
<option value="5">5 years</option>
<option value="10">10 years</option>
<option value="15">15 years</option>
<option value="20">20 years</option>
<option value="25">25 years</option>
Basically trying to solve 3 problems.
- Set the
labelcorrectly (5 years, etc) - Set the
valuecorrectly (value="5", etc) - Remove the initial blank option (start at 5)