Is it possible to watch to arrays and to add undo function on both arrays? I have $scope.test1 and $scope.test2 array, what I want to achieve is first let's say I am adding 1,2,3 to the $scope.test1 - then I am adding 4,5,6 to $scope.test2 and when I click on undo I want to undo like 5, 4, 3, 2, 1. Is this possible and if yes, how?
Is it possible to watch to arrays and to add undo function on both arrays? I have $scope.test1 and $scope.test2 array, what I want to achieve is first let's say I am adding 1,2,3 to the $scope.test1 - then I am adding 4,5,6 to $scope.test2 and when I click on undo I want to undo like 5, 4, 3, 2, 1. Is this possible and if yes, how?