New to AngularJS and have question on how to use the ng-repeat.
Currently I can only find examples where you read from a service, and then ng-repeat loops over that.
My situation is a admin can create an invitation for guests and set a property called:
total_in_party = 4;
Now based off of "total_in_party" I want to 3 input fields, for each guest in the party
Like:
<div ng-repeat="guest in party">
<input type="text" ng-model="guest.first_name" />
<input type="text" ng-model="guest.last_name" />
<select ng-model="selectedGuestMeal" ng-options="meal.id as meal.name for meal in meals"></select>
</div>
For this case, it should print those 3 input fields 4 times.
I think I am close, just need to know how to create the party object if I have no data stored in it yet?
If I am doing this completely wrong - don't hesitate to inform me!