Hello,
I have the below select box..BodyColor.Default is a property of a JSON
object and is initially a string.
<select multiple name="BodyColor.Default" [(ngModel)]="BodyColor.Default">
<option *ngFor="let z of BodyColor.Options" value={{z.OptionID}}>
{{z.OptionID}}
</option></select>
The issue is that I am getting a Javascript error TypeError: values.map is not
a function which I am guessing is because it expects BodyColor.Default to be an
array.
When I save the form it is automatically converting the BodyColor.Default to an
array and saving the value but the page is stuck then.
Can someone please tell me how to either convert BodyColor.Default to an array
inside this HTML or make it work with a string so it does not throw the
TypeError.
Thanks
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" 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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.