title: When is ngOnInit method called?
body: <p>I have the following template </p>
  
  <pre><code>&lt;div *ngIf="hotels$ | async as hotels; else loadGif "&gt;
     &lt;div *ngFor="let hotel of hotels | hotelsFilter: _filteredType; first as f; index as i " 
      appInit [hotel]="hotel " [first]="f "&gt;
      &lt;app-card appHighlight [hotel]=hotel&gt;&lt;/app-card&gt;
     &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And appInit directive is written to idenify the fist element  of hotels list after the list is filtered. This is ngInit method of appInit directive:</p>
  
  <pre><code>  constructor(
          private __hotelsService: HotelsService
        ) { }
  
        @Input()
        public hotel: Hotel;
        @Input()
        public first: boolean;
  
        public ngOnInit(): void {
          if (this.first) {
            this.__hotelsService.selectedHotel$.next(this.hotel);
            console.log('first init ' + this.hotel.name);
          }else{
            console.log('not first init ' + this.hotel.name);
          }
  
        }
  </code></pre>
  
  <p>The problem is that <code>ngOnInit</code> method of the directive is called not each time when the list of hotels is filtered and re-rendered. The question is why and when ngOnInit is really should be called?</p>