Function calls in template
Published on August 09, 2019← Back to tips
Replace function calls in template with pipes wherever possible. Angular handles the optimization in this case. Calling function is an anti-pattern and can result in unnecessary re-renders.
🔹 It’s totally fine to emit to listeners in template but not to use the data from function for rendering
🔹 This is because angular doesn’t have to rerender on event listener changes