Both Angular and AngularJS allow the use of function calls in template expressions. This seems like a reasonable approach to supply data to the template and maybe even encapsulate some of the logic behind formatting that data but it comes at a cost which I’ll explain with a simple example.
Full article