-
Notifications
You must be signed in to change notification settings - Fork 26.5k
Description
Describe the problem that you experienced
Normally you try to avoid function/method calls when inside the template (with exception being in the action expression) because angular cannot know for sure the function/method is pure. For that reason it is preferred to use a pipe where one needs to keep it pure or define it is not.
In this documentation the $any() function is called. It is not indicated if this will have any effect on performance, as it seems to have the issue I talk about in the paragraph above. OR is this a "special method" where angular knows it pure and thus has no impact on performance.
Enter the URL of the topic with the problem
https://angular.io/guide/template-expression-operators#any-type-cast-function
Describe what you were looking for in the documentation
An indication if (or not) using this method has impact on performance due to it being a method vs. a pipe.
Describe the actions that led you to experience the problem
No response
Describe what you want to experience that would fix the problem
No response
Add a screenshot if that helps illustrate the problem
No response
If this problem caused an exception or error, please paste it here
No response
If the problem is browser-specific, please specify the device, OS, browser, and version
No response
Provide any additional information here in as much as detail as you can
No response