I'm curious about how to achieve this functionality using AngularJS.
Specifically, I'd like to display a list of keywords with an edit button next to each one.
<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>
In my controller, I currently have the following setup.
$scope.editKeyword = function(name){
console.log(name);
//placeholder for code that will convert the <strong> element into a text input
};
Is it possible to replace the "strong" element with a text input field through the controller in AngularJS?
Appreciate any guidance on this.