# Why Swiper is not being initialised on ionic modal?

**URL:** <https://forum.ionicframework.com/t/why-swiper-is-not-being-initialised-on-ionic-modal/216980>\
**Category:** Ionic Framework\
**Created:** [November 4, 2021, 7:23pm UTC](https://forum.ionicframework.com/t/why-swiper-is-not-being-initialised-on-ionic-modal/216980 "2021-11-04T19:23:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![altinmullaidrizi](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@altinmullaidrizi](https://forum.ionicframework.com/u/altinmullaidrizi)\
**Post date:** [November 4, 2021, 7:23pm UTC](https://forum.ionicframework.com/t/why-swiper-is-not-being-initialised-on-ionic-modal/216980/1 "2021-11-04T19:23:04Z")

</div>

I am trying to use Swiper Angular, on an Ionic Modal but the swiper is not being initialized. When the application runs it doesn’t show any errors in the console but when the code is inspected I get this:

```auto
<swiper _ngcontent-kch-c220="">
  <!--container-->
  <!--container-->
  <!--container-->
</swiper>

```

This is how I implemented the swiper:

```auto
<swiper
  #swiper
  [slidesPerView]="3"
  [spaceBetween]="50"
  (swiper)="onSwiper($event)"
  (slideChange)="onSlideChange()">
  <ng-template swiperSlide>Slide 1</ng-template>
  <ng-template swiperSlide>Slide 2</ng-template>
  <ng-template swiperSlide>Slide 3</ng-template>
</swiper>

```

Component’s Module:

```auto
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { SetupConfirmComponent } from '@shared/components/setup-confirm/setup-confirm.component';
import { IonicModule } from '@ionic/angular';
import { SwiperModule } from 'swiper/angular';

@NgModule({
  declarations: [SetupConfirmComponent],
  imports: [CommonModule, IonicModule, SwiperModule],
  exports: [SetupConfirmComponent],
})
export class SetupConfirmModule {}

```

Also, the CSS is imported into the main CSS file and is currently working as swiper works in other components perfectly.
