title: Get array size changes in Angular 8 using IterableDiffer
body: <p>I have angular component with array of Objects</p>
  
  <pre><code>export class AlertsConfigListComponent implements OnInit, DoCheck {
  @Input() config: ProductAlertConfig[];
  </code></pre>
  
  <p>And using IterableDiffer to get changes of this array:
  <code>
    constructor(private iterableDiffers: IterableDiffers) {
      this.iterableDiffer = iterableDiffers.find([]).create(null);
    }</code></p>
  
  <pre><code>ngDoCheck(): void {
  let changes : IterableChanges&lt;ProductAlertConfig&gt; = this.iterableDiffer.diff(this.config);
  if (changes) {
    this.doSmth();
  }
  </code></pre>
  
  <p>}</p>
  
  <p>It works and I can get changes every time when array is changed.
  So now my question is. How to check in <strong>changes</strong> object that array's size is changed, because it is triggered also when I sort this array. There are no properties in <strong>IterableChanges</strong> object for this purpose.</p>
  
  <p>If I could get new size of array I would do that:</p>
  
  <pre><code>ngDoCheck(): void {
  let changes : IterableChanges&lt;ProductAlertConfig&gt; = this.iterableDiffer.diff(this.config);
  if (changes &amp;&amp; newSize !== oldSize) {
    this.doSmth();
  }
  </code></pre>
  
  <p>}</p>
  
  <p>And it would fix the problem, but are there any other solutions?</p>