ngChange is called when model changed programmatically

前端 未结 4 1637
旧时难觅i
旧时难觅i 2021-02-08 06:15

I have a problem when angular\'s ng-change is called when model is changed programmatically.

$scope.sendMessage = function() {
    $scope.message = \"Message sen         


        
4条回答
  •  太阳男子
    2021-02-08 06:49

    You are providing value to model in controller ,so whenever you will set value of model which is matching with list it will call ng-change:

    See updated plunker: http://plnkr.co/edit/f3xGmKesLFbzti56WLyH?p=preview

提交回复
热议问题