Angular: Empty Fiddle

http://angularjs.org/

by noducks

HTML

<script src="http://code.angularjs.org/1.1.5/angular.js"></script>
<div ng-controller="MyCtrl">
    <br><b> Please type lots of characters into each box </b>
    <br>
    <br>
    <br>Object Array (Works Great)
    <br>
    <div ng-repeat="c in objectArray">&nbsp;&nbsp;
        <input type="text" ng-model="c.a"></input>
    </div>
    <br>
    <br>A. Plain Array (Displays but doesn't fire a watch)
    <br>
    <div ng-repeat="value in plainArray">&nbsp;&nbsp;
        <input type="text" ng-model="value"></input>
    </div>
        
    <br>B. Plain Array (Fires a watch, but element loses focus)
    <br>
    <div ng-repeat="value in plainArray track by $index">&nbsp;&nbsp;
        <input type="text" ng-model="plainArray[$index]"></input>
    </div>
    <br>
    <br>
    <div ng-bind-html-unsafe="message"></div>
</div>

JavaScript

var myApp = angular.module('myApp', []);

function MyCtrl($scope) {

    $scope.message = "";

    $scope.objectArray = [{
        "a": "first",
            "b": "first"
    }, {
        "a": "second",
            "b": "second"
    }];

    $scope.plainArray = ['A', 'B'];

    $scope.$watch('objectArray', function () {
        $scope.message = 'Nested Array watched!<br>' + $scope.message
    }, true);


    $scope.$watch('plainArray', function () {
        $scope.message = 'Plain Array watched!<br>' + $scope.message;
    }, true);
}