title: Ionic 2 Slides LOCK
body: <p>I would like to lock the sliding feature (by swiping the screen) it should only work when i click the button.</p>
  
  <p>Since im pretty new to typescript i can't explain how i should get this to work. I found some docs on the <a href="https://ionicframework.com/docs/api/components/slides/Slides/#usage" rel="nofollow noreferrer">ionic page</a>.</p>
  
  <p>"lockSwipes(shouldLockSwipes)" 
  I think this is the code i need but i have no clue how i can include it into my IonicApp.</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;ion-slide&gt;
    &lt;ion-item&gt;
      &lt;img src="img/question.png (click)="goToSlide1()"&gt;
    &lt;/ion-item&gt;
  &lt;/ion-slide&gt;
  
  &lt;ion-slide&gt;
    &lt;ion-item&gt;
      &lt;img src="img/clue.png (click)="goToSlide2()"&gt;
    &lt;/ion-item&gt;
  &lt;/ion-slide&gt;
  
  &lt;ion-slide&gt;
    &lt;ion-item&gt;
      &lt;img src="img/answer.png (click)="Finish()"&gt;
    &lt;/ion-item&gt;
  &lt;/ion-slide&gt;
  </code></pre>
  
  <p>TS</p>
  
  <pre><code>        import {Component} from '@angular/core';
          import {NavController} from 'ionic-angular';
          import {Finish} from '../finish/finish';
          import { Slides } from 'ionic-angular';
          import { ViewChild } from '@angular/core';
  
  
          @Component({
              templateUrl: 'build/pages/slider/slider.html'
          })
          export class Slider {
              @ViewChild(Slides) slides: Slides;
              value = '';
              changeText(value: string) { this.value = value; }
              constructor(private navController: NavController) {
  
              goToSlide1() {
                  this.slides.slideTo(1, 500);
              }
              goToSlide2() {
                  this.slides.slideTo(2, 500);
              }
              goToFinish() {
                  this.navController.setRoot(Finish);
              }
      }
  }
  </code></pre>
  
  <p>I hope someone can help me out! Thanks.</p>