I am trying to implement Ionic2 Slides , but I cannot find how to set the settings:
ion slides "options" are out of date. Use the ion slide input properties instead.
I can find “input properties” (for example, auto play, speed, direction), but I don’t know where to place it. Every example that I find has [options]="slideOptions"where slideOptionsis the settings, but this does not mean that the other value does not apply to the deprecated notification.
I am new to ionic v2 and typescript, I could get a hacker solution to work, but I want to do it right.
HTML in ion-content:
<ion-slides [options]="slideOptions">
<ion-slide *ngFor="let item of items">
<img width="20%"src="{{item.thumb.source}}">
</ion-slide>
</ion-slides>
And a simplified class: import {Slides} from 'ionic-angular';
@Component({
selector: 'page-example',
templateUrl: 'example.html'
})
export class Example {
public items: any;
private slideOptions: any;
@ViewChild(Slides) slides: Slides;
constructor(private navCtrl: NavController, public navParams: NavParams) {
this.items = [];
this.albumInfo = navParams.get('item');
this.getSlides();
}
goToSlide() {
this.slides.slideTo(2, 500);
}
ngAfterViewInit() {
this.slides.autoplay = 2000;
}
makeGetRequest():Promise<string> {