خرید بک لینک

Vote count: 0

I have been struggling with this for days now, I'll appreciate your help.

I have a directive where there's an ads slide which slide-interval is tied to a var in the scope and I'm trying to change how long each one of them stays active in the slideChanged function by updating that variable, next line of code is to reload the ionicSlideBoxDeletegate, however, it's not refreshing at all.

Here's the code...

.directive('adDirective', function( $ionicSlideBoxDelegate ){
    retu {
        restrict: "E",
        replace: true,
        template: ( '<div class="absolute promo-baer-wrp">'
                    + '<ion-slide-box ng-init="disableSwipe()" auto-play="true" on-slide-changed="slideChanged(index)" show-pager="false" does-continue="true" slide-interval="{{speed}}" ng-if="ads.length">'
                        + '<ion-slide ng-click="adTap(ad)" ng-repeat="ad in ads">'
                            + '<img ng-src="{{ad.src}}" />'
                        + '</ion-slide>'
                    + '</ion-slide-box></div>' ),
        controller: function($scope) {
            $scope.slideChanged = function ( index ) {
                $scope.speed = parseInt( $scope.ads[index].category + '000' );
                $ionicSlideBoxDelegate.update();
            };
            $scope.speed = 2000;//In miliseconds
        }
    }
})

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 21 خرداد 1395 ساعت: 7:08

صفحه بندی