Angular.js view doesn't update when nested $scope array is updated

后端 未结 4 1610
借酒劲吻你
借酒劲吻你 2020-12-16 16:31

I am trying to make an angular.js view update itself when adding a comment. My code is as follows:

4条回答
  •  旧巷少年郎
    2020-12-16 17:18

    Modify the code to wrap inside scope.$apply because you are modifying the property outside the angular scope you have to use scope.$apply() to watch the values

提交回复
热议问题