In My plunker if I add some childs, then if I remove one of child record then if I add rows the rows are duplicating.
$scope.newSubItem = function(scope) {
var nodeData = scope.$modelValue;
nodeData.items.push({
id: nodeData.id * 10 + nodeData.items.length,
rowId: nodeData.rowId + '.' + (nodeData.items.length + 1),
items: []
});
};