Visit this link for an AngularJS listbox example
Displayed below is the code snippet:
<select style="width: 100%;" size="7" ng-model="currentItems" multiple
ng-multiple="true"
ng-options="opt as opt for opt in months">
</select>
This code functions properly. I am curious about what opt as opt for opt in months does.
I'm familiar with using ng-repeat like car in cars. Why doesn't it work similarly here?
In my scenario, the array of cars was:
cars = [
{make: 'Mazda', model: 'Miata', year: 2001},
{make: 'Toyota', model: 'Prius', year: 2013},
]
For their case, months looks like this:
months = ['January','February','March','April']