Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Nav button click to show drawer not working #25

Open
nabinkumarn opened this issue Mar 18, 2016 · 1 comment
Open

Nav button click to show drawer not working #25

nabinkumarn opened this issue Mar 18, 2016 · 1 comment

Comments

@nabinkumarn
Copy link

openDrawer() and closeDrawer() both function does not work. Dragging to open and close drawer works but clicking on item does not close drawer. I am using ionic 1.2.4. has anyone the solution. Documentation has used ion-pane in side menu but i am using ion-side-menu-content. Can anyone give code in details.

@nabinkumarn nabinkumarn changed the title Nav button click to show drawer; Nav button click to show drawer not working Mar 18, 2016
@m-vdv
Copy link

m-vdv commented May 25, 2016

I was able to fix this by adding this directive to the ionic.contrib.drawer.js file

.directive('menuAndDrawerToggle', ['$rootScope', '$ionicGesture', function($rootScope, $ionicGesture) {
  return {
    controller: '',
    link: function($scope, $element, $attr) {
      $element.bind('click', function(){
          $rootScope.toggleDrawerRoot();
      });
    }
  };
}]);

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants