我如何在没有点(.)c.newComment的情况下访问 Controller 中的ng-model值我只想使用ng-model =“newComment”。
<div ng-repeat="c in q.comments">
<input type="text" ng-model="c.newComment" size="30" >
<button ng-click="reply()">Reply</button>
</div>
</div>
最佳答案
由于范围继承,您确实不应该这样做,请观看 this视频了解更多信息。
关于javascript - 如何在不使用点(.)的情况下访问ng-repeat中的ng-model?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37849867/