I use a ngRepeat directive to show data of persons (now I am showing only the name of the persons).
The name of the person is shown using a span tag. Also there is a button that hide the span and show an input field containg the name of the person so it can be editable.
When I press a button I need the affected span to be "converted" to input, but it's not working and all the spans are converted to inputs.
<div ng-repeat="a_person in persons.data track by $index">
<md-button aria-label="Show inputs">
<md-icon ng-click="showInput(a_person)">edit</md-icon>
</md-button>
<span ng-if="!a_person.editMode">{{a_person.name}}</span>
<input ng-if= "a_person.editMode" type="text" value="{{a_person.name}}">
</div>
I am using a table and a form but I don't show them here so it can be easy to explain.
you need to keep an array of Boolean to keep track of showing an input field or span for each item in your
ng-repeat.and finally
Hope you get the idea.