@enamul95 wrote:
Hello Sir,
I have use some image sliding. it is working nice first time load. If i navigate one page to other page then slide not working. Here is my html code..<-div class="item item-image">
<-ion-slide-box on-slide-changed="slideChanged(index)" pager-click="navSlide(index)" auto-play="true" does-continue="true"> <-ion-slide ng-repeat="oImage in aImages" > <-img ng-src="{{oImage.src}}" class="fullscreen-image" style="height:100px;width:100%"> <-div >{{oImage.msg}}</div> <-/ion-slide> <-/ion-slide-box>
<-/div>
***********************Here is my controller****************
.controller('homeCtrl', function($scope, $state, $http, $rootScope, $ionicLoading, $timeout,$ionicPopup,$filter, $ionicHistory,$window,$ionicHistory) {
$scope.goLogin = function(){$state.go('login2');
}
var slidesInSlideshow = 4;
var slidesTimeIntervalInMs = 3000;
$scope.slideshow = 1;
var slideTimer =
$timeout(function interval() {
$scope.slideshow = ($scope.slideshow % slidesInSlideshow) + 1;
slideTimer = $timeout(interval, slidesTimeIntervalInMs);
}, slidesTimeIntervalInMs);$scope.aImages = [ { 'src' : 'img/hater_pach_banner.jpg', 'msg' : '' }, { 'src' : 'img/corporate_banking_banner.jpg', 'msg' : '' },{ 'src' : 'img/agent_banking_banner1.jpg', 'msg' : '' },{ 'src' : 'img/agricultural_loan.jpg', 'msg' : '' },{ 'src' : 'img/cards_banner_new.jpg', 'msg' : '' },{ 'src' : 'img/cash_back.jpg', 'msg' : '' },{ 'src' : 'img/islami_bank_banner.jpg', 'msg' : '' } ];
$scope.slideChanged = function(index) {
$scope.slideIndex = index;
};$scope.navSlide = function(index) { $ionicSlideBoxDelegate.slide(index, 500); }
})
Please help me so that it slide always if i navigate any page and pack to the page
Posts: 1
Participants: 1