Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49186

$ionicSlideBoxDelegate not working at all? [SOLVED]

$
0
0

@BernhardSmuts wrote:

[SOLVED] ...Solution at the end...

Hi Guys...

I have followed everything to the letter and I can't get any of the methods in $ionicSlideBoxDelegate to work.
The console.log returns blank.
I have 5 slide that all work perfectly otherwise.

My Code:

HTML (There is a lot around this HTML, but I just took out the section with the function call)

<div class="card"  ng-click="whatSlide()">
      <div class="item item-text-wrap">
        click me
      </div>
</div>

JAVASCRIPT

app.controller("myAppCtrl", function(
               $scope,
               $ionicTabsDelegate,
               $ionicActionSheet,
               $timeout,
               $ionicSideMenuDelegate,
               $ionicPopover,
               $ionicSlideBoxDelegate
               ) {


    //===Tabs and slide box controls===

    $scope.whatSlide = function() {
        $ionicSlideBoxDelegate.next()
        console.log($ionicSlideBoxDelegate.slidesCount());
    }

    //===onHold controls===

    $scope.holdTest = function() {
        console.log("hold test running");
    }

    //All Popover controls

// .fromTemplateUrl() method
  $ionicPopover.fromTemplateUrl('my-popover.html', {
    scope: $scope
  }).then(function(popover) {
    $scope.popover = popover;
  });

  $scope.openPopover = function($event) {
    $scope.popover.show($event);
  };
  $scope.closePopover = function() {
    $scope.popover.hide();
  };
  //Cleanup the popover when we're done with it!
  $scope.$on('$destroy', function() {
    $scope.popover.remove();
  });
  // Execute action on hide popover
  $scope.$on('popover.hidden', function() {
    // Execute action
  });
  // Execute action on remove popover
  $scope.$on('popover.removed', function() {
    // Execute action
  });


    //===Side menu controls===

    $scope.toggleBurgerMenu = function() {
        $ionicSideMenuDelegate.toggleRight();
    }

});

[SOLUTION]

http://blog.squashapps.com/how-to-implement-swiperjs-slides-with-ionic-1-x-using-ion-slides/

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49186

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>