Dificultad con el modelo ng, la repetición ng y las entradas

Estoy tratando de permitir que el usuario edite una lista de elementos usandongRepeat yngModel. (Ver este violín.) Sin embargo, ambos enfoques que he intentado llevan a un comportamiento extraño: uno no actualiza el modelo y el otro desdibuja la forma en cada tecla clave.

¿Estoy haciendo algo mal aquí? ¿No es este un caso de uso compatible?

Aquí está el código del violín, copiado para mayor comodidad:

<html ng-app>
    <head>
        <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap-combined.min.css" rel="stylesheet">
    </head>
    <body ng-init="names = ['Sam', 'Harry', 'Sally']">
        <h1>Fun with Fields and ngModel</h1>
        <p>names: {{names}}</p>
        <h3>Binding to each element directly:</h3>
        <div ng-repeat="name in names">
            Value: {{name}}
            <input ng-model="name">                         
        </div>
        <p class="muted">The binding does not appear to be working: the value in the model is not changed.</p>
        <h3>Indexing into the array:</h3>
        <div ng-repeat="name in names">
            Value: {{names[$index]}}
            <input ng-model="names[$index]">                         
        </div>
        <p class="muted">Type one character, and the input field loses focus. However, the binding appears to be working correctly.</p>
    </body>
</html>

Respuestas a la pregunta(8)

Su respuesta a la pregunta