JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-app="myApp">
<div ng-controller="myCtrl">
<ul>
<li ng-repeat="(id,note) in notes">{{id}} - {{note}}
<button ng-click="removeNote(id)">X</button>
</li>
</ul>
<button ng-click="addRandom()">Add item</button>
</div>
</div>
JavaScript
angular.module('myApp',[])
.controller('myCtrl',function($scope,$timeout){
$scope.notes={
a:'AngularJS',
b:'Rocks'
}
$scope.addRandom=function(){
$scope.notes[parseInt(Math.random()*10000).toString(36)]='New Item';
}
$scope.removeNote=function(id){
//emulate API call
$timeout(function(){
delete $scope.notes[id];
},2000);
}
});