title: Angular doesn't detect swiper slide changes
body: <p>I'm using <a href="https://idangero.us/swiper/api/" rel="nofollow noreferrer">swiper library</a>. In API from above link you can find that <code>mySwiper.activeIndex</code> is returning currectly selected slide. What I want to do is update my service whenever slide is changed so my app will know which slide is selected in other parts (by sharing service).</p>
  
  <p>So what I wanted to use is <code>ngOnChanges</code> which suppose to detect every change in component but it doesn't detect slide change because my code doesn't <code>console.log</code> anything. Code:</p>
  
  <pre><code>import { Component, OnInit, AfterViewInit, OnChanges } from '@angular/core';
  import Swiper from 'swiper';
  import {TouchService} from "../../services/touch.service";
  
  @Component({
      selector: 'app-nav',
      templateUrl: './nav.component.html',
      styleUrls: [ './nav.component.scss' ]
  })
  export class NavComponent implements AfterViewInit, OnChanges, OnInit {
      mySwiper: Swiper;
  
      slides = [
          'Slide1',
          'Slide2',
          'Slide3',
          'Slide4',
          'Slide5',
          'Slide6'
      ];
  
      constructor(private touchService: TouchService) {}
  
      ngAfterViewInit() {
          this.mySwiper = new Swiper('.nav', {
              paginationClickable: false,
              grabCursor: true,
              loop: true,
              slidesPerView: 3,
              spaceBetween: 50
          });
  
          this.mySwiper.on('touchStart', () =&gt; {
              this.touchService.triggerTouchStart();
          });
          this.mySwiper.on('touchEnd', () =&gt; {
              this.touchService.triggerTouchStop();
          });
      }
      ngOnChanges(changes) {
          console.log(changes);
      }
      ngOnInit() {
          setTimeout(() =&gt; {
              alert(this.mySwiper.activeIndex);
          }, 4000);
      }
  }
  </code></pre>
  
  <p>In this code setTimeout works correctly and show me currently selected slide after 4 seconds from app load. But this <code>ngOnChanges(changes) {</code> seems to be never fired because I don't see any console.logs. </p>
  
  <p>Why ngOnChanges doesn't catch <code>mySwiper</code> changes? What can I do to detect such changes?</p>