I am faced with a challenge when it comes to updating values in a form upon submission. The current setup looks like this:
<form ng-submit="updateMovie()">
<input type="text" ng-model="movie.title"/>
<input type="text" ng-model="movie.rating"/>
//what should be added here for ng-model//
<input type="text" ng-modal ="movie.__"/>
there may be multiple genre inputs depending on user input
</form>
The data structure submitted by the form will resemble the following format, without considering the ids at this point. I am uncertain about how to deal with creating the genre data, which is an array of objects.
"id": 4792,
"title": "Insidious",
"rating": "7.0",
"genres": [
{
"id": 3,
"name": "horror"
},
{
"id": 7,
"name": "Drama"
}
]