Whenever I click on the add button, new inputs are dynamically added.
Here is an example on JSBin for you to review my problem.
Each time I press the mentioned button, a new input should appear. Currently, there are 2 forms/boxes visible in the same view generated by ng-repeat with separate inputs and an individual add more button. The issue arises when I click the button, two new inputs show up in different forms instead of just one in the current form.
<div>
<div ng-repeat="op in operation track by $index">
<p>{{op.title}} | {{op.duration}} | {{op.status}}</p>
<input ng-model="operation.detailText" type="text"></input>
<div>
<div ng-repeat="operation in operations track by $index">
<input ng-model="operation.detailText" type="text"></input>
</div>
<button ng-click="operations.push({})">Add one more</button>
</div>
</div>
</div>
JS:
angular.module('ionicApp',[])
.controller('mainCtrl', function($scope) {
$scope.operations = [];
$scope.operation = [];
$scope.operation = [{
title : 'Operación 170794',
duration : '3600',
status : '0'
}, {
title : 'Operación 981922',
duration : '60',
status : '0'
}];
});