Good day, recently began studying AngularJS, and there was a question why the function in the controller
$scope.somefunc = function(){ console.log(1); } When it is called once in the template, in the debugger it shows that it was called 20 times, and not put to it once. Tell me which way to dig, and what could be the problem here?
Controller code
.controller('ScheduleCtrl', function ($scope) { $scope.func = function(){ console.log(1); }; }); View
<div ng-controller="ScheduleCtrl"> {{func()}} </div> Here is the result:
http://joxi.ru/V2VBJ9Qswb9E2v - the red number in the circles is the number of repetitions