0
我對使用ngrepeat填充的每篇文章都有評論功能。 添加的新評論應更新爲評論。ngrepeat中的動態ngmodel值並對其進行處理
<div ng-repeat="Article in Articles">
<div class="Description">
{{Article.Description}}
</div>
<div class="commentbox">
<textarea placeholder="Share your View" ng-model="Article{{Article.Articleid}}" ></textarea>
<div class="post">
<a href="javascript: void(0)" ng-Click="AddComment({{Article.Articleid}});" > Article </a>
</div>
</div>
</div>
和js函數添加的評論是
$scope.AddComment = function(ArticleID){
$scope.Comments.push({
ArticleID: ArticleID,
**ReviewText: $scope.Comment130, //how to acess the model of received ArticleID**
DateAdded:new Date()
});
我的問題是如何設置的動態值NG-模型和訪問它在jsfunction。
謝謝
什麼是'NG-模型= 「第{{Article.Articleid}}」'? – Cherniv