# Ionic 2 RC5+ Advanced Slides

**URL:** <https://forum.ionicframework.com/t/ionic-2-rc5-advanced-slides/78147>\
**Category:** ionic-v3\
**Created:** [February 2, 2017, 10:07am UTC](https://forum.ionicframework.com/t/ionic-2-rc5-advanced-slides/78147 "2017-02-02T10:07:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hitpopdimestop](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/hitpopdimestop/32/106390_2.png) [@hitpopdimestop](https://forum.ionicframework.com/u/hitpopdimestop)\
**Post date:** [February 2, 2017, 10:07am UTC](https://forum.ionicframework.com/t/ionic-2-rc5-advanced-slides/78147/1 "2017-02-02T10:07:52Z")

</div>

Hello!  
I’m trying to finish migrating from Ionic2 RC4 to Ionic 2.0.0 and experience troubles with slides. There’s not much in docs about how to implement advanced slides, but it seems like I’ve done everything right and it gives me an error.

My specs:

```
Ionic Framework: 2.0.0
Ionic Native: 2.4.1
Ionic App Scripts: 1.0.0
Angular Core: 2.2.1
Angular Compiler CLI: 2.2.1
Node: 7.0.0
OS Platform: macOS Sierra
Navigator Platform: MacIntel
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36

```

My HTML:

```
<ion-slides #slider (ionSlideDidChange)="onSlideChanged()">
  <ion-slide *ngFor="let sub of subcategoriesArray">
    {{ sub.name }}
  </ion-slide>
</ion-slides>
<ion-slides #subSlider (ionSlideDidChange)="onSubSlideChanged()" class="services-slider">
  <ion-slide *ngFor="let sub of subcategoriesArray">
    <ion-col *ngFor="let service of sub.services">
      <ion-item (click)="goToService(service)">
        {{service}}
      </ion-item>
    </ion-col>
  </ion-slide>
</ion-slides>

```

My TS:

> @ViewChild(‘slider’) slider: Slides;  
> @ViewChild(‘subSlider’) subSlider: Slides;

> ngAfterViewInit() {  
> // Slider options  
> this.slider.freeMode = false;  
> this.slider.freeModeMomentumBounce = false;  
> this.slider.slideToClickedSlide = true;  
> this.slider.centeredSlides = true;  
> }

The first line in ngAfterViewInit hook gives an error:  
**Error in :0:0 caused by: Cannot set property ‘freeMode’ of undefined**

If you have any ideas what am I doing wrong, please share with me.  
Thank you!

---

<div class="post-metadata">

**Author:** ![alasdairmackenzie](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/alasdairmackenzie/32/75923_2.png) [@alasdairmackenzie](https://forum.ionicframework.com/u/alasdairmackenzie)\
**Post date:** [June 11, 2017, 1:25pm UTC](https://forum.ionicframework.com/t/ionic-2-rc5-advanced-slides/78147/2 "2017-06-11T13:25:41Z")

</div>

Did you find a solution for this?

---

<div class="post-metadata">

**Author:** ![hitpopdimestop](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/hitpopdimestop/32/106390_2.png) [@hitpopdimestop](https://forum.ionicframework.com/u/hitpopdimestop)\
**Post date:** [June 11, 2017, 8:24pm UTC](https://forum.ionicframework.com/t/ionic-2-rc5-advanced-slides/78147/3 "2017-06-11T20:24:14Z")

</div>

It doesn’t seem to be the best thing to do, but wrapping the code in setTimeout helped
