title: Angular: *ngFor trackby Date
body: <p>my problem is, that I am Iterating over an Array of Dates in an Angular template. The reference of the Dates changes every time, so the view is redrawing what slows down the application. My idea was, to do a "trackby" with Date.getTime() but that doesn't work correctly. The DOM-Elements are recreated yet. That makes the site very slow.</p>
  
  <p>Here's the code example:</p>
  
  <pre><code>&lt;div *ngFor ="let month of (months$ | async); trackBy: trackByMonth"&gt;
  ... 
  &lt;/div&gt;
  
  trackByMonth(index, item) {
      return item.getTime();
  }
  </code></pre>
  
  <p>Has anyone an idea how I can avoid the redrawing of the DIV-Elements?</p>