Angular: Empty Fiddle
http://angularjs.org/
HTML
<script src="http://code.angularjs.org/angular-1.0.1.js"></script>
<div ng-controller="MyCtrl">
<p>Items: {{items}}</p>
<p>Query:</p>
<ul>
<li ng-repeat="i in query">* "{{items[i]}}"</li>
</ul>
<p>Object: {{objectTest.instance}}</p>
</div>
JavaScript
var myApp = angular.module('myApp', []);
function MyCtrl($scope) {
var items = ["one", "two", "three"];
$scope.items = items;
$scope.query = [0, 1];
// Next line only makes {{items}} to update (not {{query}})
$scope.items[0] = "new one";
//testing 123
var object1 = {
instance: 1
};
$scope.objectTest = object1;
object1.instance = 2;
object1 = {
instance: 3
};
object1.instance = 4;
}