How to get total slides count


#1

How do i get the total slides count of ion-slide-box on page load ? it seems, from what i have tried that i can only get slides count after the page is loaded.


#2

Well if the slides are from ng-repeat, you can use .length

$scope.slides = [ 
  // Some dynamic slides here
];
console.log($scope.slides.length());

#3

thanks, i’ll try that