I'm creating editable table, and while editing all rows became input fields, how to choose only one row that I'm clicking on?

This is a piece of my table

```
<table>
 <tr ng-repeat="item in data track by $index">
   <td>
      <span ng-if="!editing">{{item.username}}</span>
      <span ng-if="editing">
         <!-- If I use ng-if="editing && index == $index" than all other fields disappear -->
         <input type="text" name="name" class="form-control" ng-model="item.username">
      </span>
   </td>
   <td>
      <div ng-if="!editing">
         <button ng-click="edit()" >Edit</button>
      </div>
   </td>
 </tr>
<table>

```

Controller:

```
.controller('formCtrl', function($scope) {

        $scope.editing = false;
        $scope.index = "";
        $scope.edit = function(index) {
            $scope.editing = true;
            $scope.index = index;
        };

```