danielepiccone / ng-pageslide

AngularJS sliding panel for serving additional content from off the page
http://danielepiccone.github.io/ng-pageslide/examples/
452 stars 162 forks source link

Not working after changing state or clickOutside set to true #165

Closed marie-dk closed 7 years ago

marie-dk commented 7 years ago

Whenever I change the state or use ps-click-outside true, the toggle function stops working.

$scope.slideMenuOpen = false; $scope.toggleSlideMenu = function(){ $scope.slideMenuOpen = (/ng-pageslide-body-open/.test(document.body.className))?false:true; };

Doing a bit of debugging, it seems that the watch function that detects changes in ps-open, simply stops watching for changes.

marie-dk commented 7 years ago

Nevermind... I've been poking around, and now it works. Not exactly sure why. Feeling pretty stupid today :-/