title: Angular change detection, when calling a function from template
body: <p>I have just called a function from a template and inside that I am simply returning true or false;</p>
  
  <p><a href="https://stackblitz.com/edit/angular-ivy-awrmsl?file=src%2Fapp%2Fapp.component.ts" rel="nofollow noreferrer">https://stackblitz.com/edit/angular-ivy-awrmsl?file=src%2Fapp%2Fapp.component.ts</a></p>
  
  <p>Check the console of above link project, so array has 7 items but in console I can see twice logs. (
  i have updated this question and stackblitz link)
  i have images and i want on error img tag should not be there so i called the same function twice from template 
  whats correct ways to implement this type of logic ?
  <strong>i need if error is there in image than no image tag should be there</strong></p>
  
  <p><strong>Please check console logs</strong>.</p>
  
  <p>I have not changed any property - what might be happening here?</p>
  
  <p>(I tried different answers in a search engine search still not getting the exact point).</p>