If I have a function that returns an object. eg.
$scope.getPoint = function()
{
//some calculation logic goes here
return {x:1,y:2};
}
And I want to display properties from it in a template:
<b>som html</b> x: {{getPoint().x}} y:{{getPoint().y}}
That would result in two calls to the function. (I know, angular may call it a gazillion times anyway)
Is there any way to reuse the same return value in a template?