# Ion-slider in ion-menu not working

**URL:** <https://forum.ionicframework.com/t/ion-slider-in-ion-menu-not-working/70381>\
**Category:** ionic-v3\
**Created:** [November 16, 2016, 7:03pm UTC](https://forum.ionicframework.com/t/ion-slider-in-ion-menu-not-working/70381 "2016-11-16T19:03:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![munkhaus](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@munkhaus](https://forum.ionicframework.com/u/munkhaus)\
**Post date:** [November 16, 2016, 7:03pm UTC](https://forum.ionicframework.com/t/ion-slider-in-ion-menu-not-working/70381/1 "2016-11-16T19:03:41Z")

</div>

created a side menu project with:

ionic start mySideMenu sidemenu --v2

added ion-slides.

The slider only show first slide and no slide to next slide is working.

```
 <ion-menu [content]="content">
  <ion-header>
    <ion-toolbar>
      <ion-title>Menu</ion-title>
    </ion-toolbar>
  </ion-header>

  <ion-content>

    <ion-slides>
      <ion-slide>
        <h1>Slide 1</h1>
      </ion-slide>
      <ion-slide>
        <h1>Slide 2</h1>
      </ion-slide>
      <ion-slide>
        <h1>Slide 3</h1>
      </ion-slide>
    </ion-slides>

    <ion-list>
      <button menuClose ion-item *ngFor="let p of pages" (click)="openPage(p)">
        {{p.title}}
      </button>
    </ion-list>
  </ion-content>

</ion-menu>

<!-- Disable swipe-to-go-back because it's poor UX to combine STGB with side menus -->
<ion-nav [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>
```

---

<div class="post-metadata">

**Author:** ![seser](https://avatars.discourse-cdn.com/v4/letter/s/7feea3/32.png) [@seser](https://forum.ionicframework.com/u/seser)\
**Post date:** [March 15, 2017, 10:36am UTC](https://forum.ionicframework.com/t/ion-slider-in-ion-menu-not-working/70381/2 "2017-03-15T10:36:44Z")

</div>

I’m trying to do the same and the slider doesn’t work at all.

Have you been able to find a solution?

Is it simply not possible to use ion-slides in ion-menu?

EDIT:

So I’ve found the solutions in the end. Posting this in case it helps somebody else in the future.

I was going through the issues related to slides and came across this particular one:

> <https://github.com/ionic-team/ionic/issues/10176>

It turns out that if slides are not visible, it won’t be initialized properly. So I just needed to update it.

Here’s the code I used:

app.component.ts

```
import { ViewChild } from '@angular/core';
import { Slides } from 'ionic-angular';

...

@ViewChild('switcher') switcher: Slides;

...

  menuOpened() {
    this.switcher.update();
  }

```

app.html

```
<ion-menu [content]="content" (ionOpen)="menuOpened()">

...

<ion-slides #switcher>

```

It appears to be working fine after this. Hope this helps another frustrated soul!

---

<div class="post-metadata">

**Author:** ![Pooji\_123](https://avatars.discourse-cdn.com/v4/letter/p/c4cdca/32.png) [@Pooji\_123](https://forum.ionicframework.com/u/Pooji_123)\
**Post date:** [March 17, 2017, 9:47am UTC](https://forum.ionicframework.com/t/ion-slider-in-ion-menu-not-working/70381/3 "2017-03-17T09:47:01Z")

</div>

Thanks it’s really helpful

> [@seser](#):
>
> I’m trying to do the same and the slider doesn’t work at all.
> 
> Have you been able to find a solution?
> 
> Is it simply not possible to use ion-slides in ion-menu?
> 
> EDIT:
> 
> So I’ve found the solutions in the end. Posting this in case it helps somebody else in the future.
> 
> I was going through the issues related to slides and came across this particular one:
> 
> [Slider Does not initialize correctly if it hidden · Issue #10176 · ionic-team/ionic-framework · GitHub](https://github.com/driftyco/ionic/issues/10176)
> 
> It turns out that if slides are not visible, it won’t be initialized properly. So I just needed to update it.
> 
> Here’s the code I used:
> 
> app.component.ts
> 
> ```
> import { ViewChild } from '@angular/core';
> import { Slides } from 'ionic-angular';
> 
> ...
> 
> @ViewChild('switcher') switcher: Slides;
> 
> ...
> 
> menuOpened() {
> this.switcher.update();
> }
> 
> ```
> 
> app.html
> 
> ```
> <ion-menu [content]="content" (ionOpen)="menuOpened()">
> 
> ...
> 
> <ion-slides #switcher>
> 
> ```
> 
> It appears to be working fine after this. Hope this helps another frustrated soul!

Thanks

---

<div class="post-metadata">

**Author:** ![Pooji\_123](https://avatars.discourse-cdn.com/v4/letter/p/c4cdca/32.png) [@Pooji\_123](https://forum.ionicframework.com/u/Pooji_123)\
**Post date:** [March 21, 2017, 7:39am UTC](https://forum.ionicframework.com/t/ion-slider-in-ion-menu-not-working/70381/4 "2017-03-21T07:39:58Z")

</div>

bug(slides): pager not set correctly after being hidden

[https://github.com/driftyco/ionic/issues/10212](https://github.com/driftyco/ionic/issues/10212) can any one found solution for this problem

---

<div class="post-metadata">

**Author:** ![ramanjaneya](https://avatars.discourse-cdn.com/v4/letter/r/22d042/32.png) [@ramanjaneya](https://forum.ionicframework.com/u/ramanjaneya)\
**Post date:** [May 15, 2018, 10:53am UTC](https://forum.ionicframework.com/t/ion-slider-in-ion-menu-not-working/70381/5 "2018-05-15T10:53:50Z")

</div>

nice but pagination bullets are not showing activeness correctly when we use pager property to slides. and slideTo not working  
menuOpened() {  
this.switcher.update();  
this.switcher.slideTo(1,200); //this line not working and not showing index 1 slide and pagination bullets are also not shoowing activeness correctly  
}

---

<div class="post-metadata">

**Author:** ![AhilJose](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@AhilJose](https://forum.ionicframework.com/u/AhilJose)\
**Post date:** [January 29, 2020, 7:03am UTC](https://forum.ionicframework.com/t/ion-slider-in-ion-menu-not-working/70381/6 "2020-01-29T07:03:39Z")

</div>

navigation bar menu is not working after the successful event booking.Anyone can any idea about this issue

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:01pm UTC](https://forum.ionicframework.com/t/ion-slider-in-ion-menu-not-working/70381/7 "2021-07-19T21:01:49Z")

</div>

Closed on July 19, 2021, 9:01pm UTC


