So I have made this very simple script to isolate the problem. I tested with different versions of angular and in the fiddle if you select version 1.1.1 it works fine. You can hit the add button as many times as you want. Newer versions seem to have a problem with this approach. Is this a bug, a security measure or should I just write a directive? In this fiddle I am loading the latest version, but you can remove this version and change this to 1.1.1 and it will work. Also, 1.2.1 has the same problem. Thanks in advance for any tips.
HTML
<div ng-app="app"> <div ng-controller="ctrl"> <div ng-repeat="item in naam"> <div>{{item}}</div> </div> <button ng-click="add()">add</button> </div> </div> JS
var app = angular.module("app", []); app.controller("ctrl", function ($scope) { $scope.naam = [ "1", "2"]; $scope.add = function () { var x = 3; var y = 4; $scope.naam.push(x, y); } });