I was wondering how this can be done in AngularJS.
Having this list of keywords and an edit button next to it.
<tr ng-repeat="keyword in keywords">
<td>
<strong id="keyword.name">{{ keyword.name }}</strong>
</td>
<td>
<button ng-click="editKeyword(keyword.name)">Edit</button>
<button ng-click="deleteKeyword(keyword.name)">Delete</button>
</td>
</tr>
Now in my controller I have something like this.
$scope.editKeyword = function(name){
console.log(name);
//something done to change the <strong> element into a text input
};
How can I replace the "strong" element with a text input field via the controller. Can this be done in angularJS?
Thanks for the help.