I use ng-repeat in a table,and update data once per second; however the text
input also been updated,but i don't want to update the text.How should i do?
<body ng-controller="formController">
<table border='1' cellpadding=2 cellspacing=2>
<tr ng-repeat="a in array.Ip">
<td>{{a.name}}</td>
<td>{{a.price}}</td>
<td>{{a.count}}</td>
<td><input type="text"></td>//content in text should not be updated!
<td><button>Add</button></td>
</tr>
</table>
</body>
<script>
var app = angular.module('app', []);
app.controller('formController', function($scope) {
setInterval(function(){
$scope.$apply(updatedata);
},1000);
}
</script>
在此输入代码...
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.