Ben10 Ben10 - 7 months ago 42
AngularJS Question

ng-repeat $index for a form field array (ie add new option)

I have two select fields using

method I was adding (clone) the inputs.

I was two different array to maintain to push and remove the object.
But I need to maintain in single array is possible?

My working fiddle is here My Fiddle


Yes possible, just have $scope.model.campuses = [];only, and have a object for school and campus and push it to the array

  function newCampus() {
        $log.log("Adding a new campus");
        $scope.model.campuses.push({Campus :$scope.model.campus, School :$});


Working fiddle