Closed shahroon closed 8 years ago
Never mind, fixed it. I was not using the watcher on slider. Now struggling with removing pager and on-slide-change kind of options.
@shahroon
Hi, have the same error happening on my side since I upgrade to 1.3.0. Can you tell me what you means by "not using the watcher on slider" and how you fixed it?
Thanks
@turbulence Do something like this,
$scope.sliderOptions = {
effect: 'slide',
paginationHide: true,
initialSlide: 0,
onInit: function(swiper){
$scope.swiper = swiper;
},
onSlideChangeEnd: function(swiper){
// ....
}
};
and on template something like this,
<ion-slides options="sliderOptions" slider="swiper">
// ....
Hope this will help.
@shahroon
Thanks so much, it works!
Here's what I add to my code:
$scope.options =
{
loop: false,
pagination: false,
onInit: function(swiper)
{
$scope.data.swiper = swiper;
},
...
And in my template file:
<ion-slides pager="false" options="options" slider="data.slider">
Thanks again
Glad it helped.
@shahroon Thanks so much, it works!
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.
The error started to appear when I switched from Ionic-1.0.0-beta.14 to Ionic-1.2.4. I was using ion-slide-box before and now switched to ion-slides.
Which Ionic Version? 1.x or 2.x 1.2.4
Run
ionic info
from terminal/cmd prompt: (paste output below) Cordova CLI: 5.4.1 Ionic Version: 1.2.4 Ionic CLI Version: 1.7.14 Ionic App Lib Version: 0.7.0 OS: Distributor ID: Ubuntu Description: Ubuntu 14.04.4 LTS Node Version: v0.12.4