Using Angular Chosen to allow a multi select drop down for nationalities. https://github.com/localytics/angular-chosen
I am getting an error of
"a.forEach is not a function"
This error occurs whether you have selected one, two or zero options.
I have looked at this post
Getting a a.foreach is not a function error
however my selected value is already an array so it does not provide any help on the issue.
Here is my html
<li class="form-row">
<span class="label">
<label for="nation">Nationality</label>:
</span>
<div class="field country">
<select
chosen
multiple
ng-model='person.nation'
ng-options='c.name as c.name for c in countries'
id="nation"
data-select-max="2"
data-token="Nationalities"
data-placeholder="- Select your nationalities -">
</select>
</div>
</li>
And my options ($scope.countries) looks like
[
{ id="1", name="United States"},
{ id="2185", name="Afghanistan"},
etc....
]
Any advice would be much appreciated.