how can I call a controller function from html attribute. For example:
Controller function:
$scope.foo = function(id)
{
return id+1;
}
And here is the html:
<div ng-repeat obj in arr id="foo(obj.id)"></div>
This way I am getting ...id=foo(obj.id) instead of ...id="2" (if obj.id is equal 1).
Thanks!
id="{{foo(obj.id)}}"changeFormat(obj.date))