I have an angular repeater bound to an array. When I push a new item, the UI updates as expected, but for subsequent pushes, the array updates but the UI doesn't change. I already tried scope.$apply() but it doesn't make any difference.
var app = angular.module('m', []);
app.controller('myCtrl', function ($scope) {
$scope.maxValue = 6;
$scope.values = [1,2,3,4,5,6];
$scope.update = function (){
$scope.maxValue++
$scope.values.push($scope.maxValue);
//$scope.$apply();
}
});
Not sure what I'm doing wrong. Here's a small example that replicates the problem.