JSFiddle - React, Tailwind, and code Playground
HTML
<!doctype html>
<html ng-app>
<script src="http://code.angularjs.org/angular-1.0.0rc3.min.js"></script>
<script>
function XCtrl($scope) {
$scope.messages = ["aaa","bbb","ccc"];
$scope.removeMessage = function(i) {
$scope.messages.splice(i, 1);
}
}
function MCtrl($scope) {
}
</script>
<body>
<div ng-controller="XCtrl">
<div ng-repeat="m in messages">
<div ng-controller="MCtrl">
<div ng-hide="editorEnabled" ng-click="editorEnabled=true">
<div>
{{m}}
<div>
<a ng-click="removeMessage($index); $event.stopPropagation()">del</a>
</div>
<div ng-show="editorEnabled">
<textarea>{{m}}</textarea>
<button ng-click="editorEnabled=false">cancel</button>
</div>
</div>
</div>
</div>
</body>
</html>