Angular break on InnerHTML append
HTML
<div ng-app="app">
<div ng-controller="testCtrl as test">
<button ng-click="test.foo()" value="Load">
Load
</button>
<button ng-click="test.bar()" value="Clear">
Clear
</button>
<div ng-repeat="foo in test.fooLog track by $index">
{{foo}}
</div>
</div>
</div>
JavaScript
angular.module('app', [])
.controller('testCtrl', ['$scope', function($scope) {
var self = this;
self.data = ["test"];
self.fooLog = [];
self.foo = function()
{
self.fooLog.push("foo");
};
self.bar = function()
{
console.log('bar');
self.fooLog = [];
};
}]);