I am working on a form that looks like this:
<input type="text" ng-model="gen.name" ng-repeat="gen in movie.genres">
The gen
in the movie.genre
is an object with two key-value pairs:
Object{
id: 24,
name : insidious
}
However, when I submit the form, I only receive the value of gen.name
,
but I also need to obtain the id
of the gen object.
How can I modify my code to retrieve the id as well? It's important to note that there are multiple input values since they are inside an ng-repeat loop.