I want to expand a basic angularjs form so that it can have a dynamic number of inputs. Basically I want to create a user that can have 1 or more siblings. If you click a + button on the form it will add an additional sibling input to the form and keep them as an array. What concepts would I use to accomplish this in angular?
How can I add elements to a partial view in angular when the user clicks? And how can I make those inputs be kept as an array?
<div ng-controller="Controller">
<form novalidate class="simple-form">
Name: <input type="text" ng-model="user.name" /><br />
Siblings: <input type="text" ng-model="user.sibling[0]" /><br />
<a href="#" name="moresiblings">+</a>
</form>
<pre>form = {{user | json}}</pre>
</div>