I need to populate a <select> with a list of countries.
This is as close as I get.
HTML:
<select id="country_id" type="text" class="form-control"
ng-model="formData.countries" ng-options="k as v for (k,v) in
formData.countries track by v"/></select>
So my select initially has all the countries pulled from the database and
returned in $scope.formData;
so the raw data is a key value array of data like:
{
..... ohter data
countries:
["Afghanistan",
"Albania",................
"Zimbabwe"]
}
When I select a country it then changes to the key so if i select USA the
select now displays 142
Tried every way I can think of and no go.
Any help would be great.
Thanks,
Dave
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.