I'm currently updating an application where developers originally included function calls directly in the HTML templating, like this:
<span>{{'getX()'}}</span>
This resulted in the getX method being called after each change detection cycle, leading to poor performance. I have since corrected this issue.
However, I am now wondering about using methods on default data types. Will Angular evaluate the result of calling toLowerCase on strings after every change detection cycle?
<span>{{'myString.toLowerCase()'}}</span>
Furthermore, will the get function of a TypeScript Map object be invoked after each change detection cycle as well?
<span>{{'myTSMap.get('key')'}}</span>
If not, would utilizing pipes be the optimal solution for addressing this concern? Thank you.