Property 'lockSwipeToNext' does not exist on type 'Slides'

According to the documentation this method should be available for me to use, however it doesnt seem to be. Am I missing an import or is something else wrong?

This is what I used in the constructor in order to access this function.

    this.slideOptions = { 
      onlyExternal: false,
      onInit: (slides: any) =>
        this.slider = slides

Any chance you can go into more detail about where lockSwipeToNext is used in your constructor?

This is my silder:
<ion-slides [options]="slideOptions">

I have added this property:
slideOptions: any;
In my constructor this:

   'this.slideOptions = { 
      onlyExternal: false,
       onInit: (slides: any) =>
          this.slider = slides

Then I can use this in my functions

1 Like

Thank you!!! Got it to work with this

You can also use this:

<ion-slides [options]="{onlyExternal: true}">



    <button ion-button menuToggle>
      <ion-icon name="menu"></ion-icon>
<ion-content padding id="page8" scroll="false">
	<ion-slides [options]="slideOptions" pager>
			<div class="box blue"><h1>BLUE</h1></div>
			<div class="box yellow"><h1>YELLOW</h1></div>
			<div class="box pink"><h1>PINK</h1></div>

I get the following error when I am trying to add the [options] in the ion-slides tag.

Can’t bind to ‘options’ since it isn’t a known property of ‘ion-slides’.

  1. If ‘ion-slides’ is an Angular component and it has ‘options’ input, then verify that it is part of this module.
  2. If ‘ion-slides’ is a Web Component then add ‘CUSTOM_ELEMENTS_SCHEMA’ to the ‘@NgModule.schemas’ of this component to suppress this message.
  3. To allow any property add ‘NO_ERRORS_SCHEMA’ to the ‘@NgModule.schemas’ of this component. ("

    <ion-slides [ERROR ->][options]=“slideOptions” pager>

What am I doing wrong?