ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
50.94k stars 13.52k forks source link

[Ionic v4] Property 'onlyExternal' does not exist on type 'Slides' #14792

Closed peterpeterparker closed 6 years ago

peterpeterparker commented 6 years ago

Ionic Info

v4.0.0-alpha.9

Describe the support Request

When I declare a slide ViewChild in my class and try to use onlyExternal as previsously in v3 I get the following error at build time

 error TS2339: Property 'onlyExternal' does not exist on type 'Slides'.

Should I import differently the Slider in v4? Another component maybe? The slide isn't listed in the breaking change list https://github.com/ionic-team/ionic/blob/master/angular/BREAKING.md

Thx in advance

Code

 import {Slides} from '@ionic/angular';

 @ViewChild('mySlider') private slides: Slides;

 ionViewDidEnter() {
   this.slides.onlyExternal = true;
 }

Maybe

Maybe it should be now set as options in the html template?

<ion-slides [options]="{onlyExternal: true}">
peterpeterparker commented 6 years ago

In v4, onlyExternal could/should be solve differently respectively with the option allowTouchMove set to false

 myOptions: SwiperOptions = {
    allowTouchMove: false
 };

 <ion-slides [options]="myOptions"></ion-slides>
ionitron-bot[bot] commented 6 years ago

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.