http://jsfiddle.net/yhv9bjrx/2/
In the fiddle above, I'm trying to let users add a new open time when they hit the new item button. The problem I'm having is that when the button is clicked, it updates both events in the ng-repeat, instead of the current event its on.
<ul>
<li ng-repeat="event in orgEvents">
<h3>Event ID: {{event.CampaignEventID}}</h3>
<h2>Event Name: {{event.Name}}</h2>
<ul>
<li ng-repeat="time in orgEventTimes">
<div ng-if="time.CampaignEventID == 1">
Event ID: <input type="text" ng-model="time.CampaignEventID">
Open: <input type="text" ng-model="time.OpenTime">
</div>
</li>
<button ng-click="add(item)">New Item</button>
</ul>
<hr/>
</li>
</ul>
Also for some reason the ng-if statement is not working, and it is showing every event in the $scope.orgEventTimes array, instead of just the ones belong to this event.