Function inside the AngularJS Controller

前端 未结 3 1718
暗喜
暗喜 2021-01-30 20:46

I have code snippet in which there is a Angular Modular Controller, but there is a function inside the same controller and with a call, which is raising doubt in my mind that is

3条回答
  •  别跟我提以往
    2021-01-30 20:55

    The definition is allowed, it has the same affect as

    $scope.$watch($scope.totalCart, function(){..some logic...})
    

提交回复
热议问题