title: Ionic 5 angular - migrate ion-slides to swiper.js
body: <p>I have received a <strong>warning</strong> for using <code>ion-slides</code> saying ion-slide is depricated and will be removed in ionic v7. and is suggest to use <code>swipper.js</code> instead.</p>
  <p>Now I followed this <a href="https://ionicframework.com/docs/angular/slides#swiping-with-style" rel="nofollow noreferrer">swiper.js</a> tutorial on how to integrate swiper with Ionic-angular project.</p>
  <p><strong>Installed swiper</strong></p>
  <pre><code>npm install swiper@6
  </code></pre>
  <p><strong>added styles</strong></p>
  <pre><code>@import '~swiper/swiper';
  @import '~@ionic/angular/css/ionic-swiper';
  </code></pre>
  <p><strong>app Module</strong></p>
  <pre><code>import { SwiperModule } from 'swiper/angular';
  
  @NgModule({
    declarations: [AppComponent],
    ...
    imports: [
      ...
      SwiperModule
    ],
    ...
  })
  </code></pre>
  <p><strong>gallery.component.html</strong></p>
  <pre><code>&lt;swiper&gt;
    &lt;swiper-slide&gt;Slide 1&lt;/swiper-slide&gt;
    &lt;swiper-slide&gt;Slide 3&lt;/swiper-slide&gt;
    &lt;swiper-slide&gt;Slide 3&lt;/swiper-slide&gt;
  &lt;/swiper&gt;
  </code></pre>
  <p><strong>gallery.component.ts</strong></p>
  <pre><code>import SwiperCore from 'swiper';
  import { IonicSwiper } from '@ionic/angular';
  
  SwiperCore.use([IonicSwiper]);
  </code></pre>
  <p>and the <strong>Error</strong> I'm getting is:</p>
  <blockquote>
  <p>NG0304: <strong>'swiper' is not a known element</strong></p>
  </blockquote>
  <blockquote>
  <p>NG0304: <strong>'swiper-slide' is not a known element</strong></p>
  </blockquote>
  <p>where do I import the missing components?</p>
  <p>I have tried importing the <code>SwiperComponent</code></p>
  <pre><code>import { SwiperComponent } from 'swiper/angular';
  
    declarations: [
      ...
      SwiperComponent
    ],
  </code></pre>
  <p>then I get an Error</p>
  <blockquote>
  <p><strong>Error:</strong> Type SwiperComponent is part of the declarations of 2 modules</p>
  </blockquote>