Jan 30, 2025
Love the pipe for function calling in the template. Another way of avoiding the infinite function calls inside the template when the change detection is executed is using changeDetection: ChangeDetectionStrategy.OnPush in the component definition. The 'problem' (not really a problem) is that you need to handle template updates using ChangeDetectorRef.
Moral of the story is that you should not use function calls in a template, unless those functions are signals or actions for a certain user event.