Dynamic ng-model value in ng-repeat


#1

I have generated n number of text box with ng-repeat. I want to generate dynamic ng-model name. How to make it ? Also how to get ng-model name in my controller so that I can use that name to insert into mysql database

  <div class="list" ng-repeat="i in getNumber(number) track by $index">
        <h5> Passenger {{$index+1}}</h5>
      <label class="item item-input">
        <span class="input-label">Full Name</span>
        **<input type="text" ng-model="mys.name[$index+1]">**
      </label>
    </div> 

In my controller

$scope.number=  5
  $scope.getNumber = function(num){
    return new Array(num);
  }