Why is the one time binding called twice?
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.foo = function() {
console.log('foo');
return 'foo';
}
});
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js"></script>
<body>
<div ng-app="myApp" ng-controller="myCtrl">
<span ng-bind="::foo()"></span>
</div>
</body>
</html>
The same is for the regular binding (during first digest).