*ngFor running an infinite loop in angular2 : <p>I am trying to render object properties using keys in angular2 using below code:</p>

<pre><code>&lt;ul&gt;
    &lt;li *ngFor="let element of componentModel | keys;let i=index"&gt;
      {{element.key}}--{{element.value}}  // 1---Bhushan...loaded only once
      &lt;span  *ngIf="element"&gt;{{ loadProperty(i,element) }}&lt;/span&gt;
    &lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>But I am facing a problem here. The output in the browser in loaded only once. 
but the method call i.e. <code>loadProperty(i,element)</code> is running in an infinite loop.</p>

<pre><code>loadProperty(i:number,element:any){       
    console.log(element.key+'========'+element.value);
    console.log(element);      
}
</code></pre>

<p>means on browser output </p>

<blockquote>
  <p>(1---Bhushan)</p>
</blockquote>

<p>is displayed only once but on the console its running infinitely like below:</p>

<p><a href="https://i.stack.imgur.com/YN902.png" rel="noreferrer"><img src="https://i.stack.imgur.com/YN902.png" alt="Snapshot of the console"></a></p>

<p>I want to call this method only once per iteration.</p>

<p>any inputs?</p>
