AngularJS Example
by Andre Lee
HTML
<div ng-app="myapp">
<div ng-controller="MyController">
<div ng-repeat="item in getList()">
{{item}}
</div>
</div>
</div>
JavaScript
angular.module('myapp', []);
var MyController = function($scope) {
$scope.my_array = ['a', 'b'];
$scope.getList = function(){
console.log('### watch here! ###');
//$scope.my_array.push(Math.random());
return $scope.my_array;
}
}