Using google maps cordova plugin

drewrygh suggested this solution to the side menu problem, and this worked great for me:

  1. use ng-hide on the ion-side-menu element:

    <ion-side-menu side=“left” ng-controller=“MenuCtrl” ng-hide=“hideLeft” >

  2. and then in the controller check if the menu is open(ed).

    .controller(‘MenuCtrl’, [’$scope’, ‘$ionicSideMenuDelegate’, function($scope, $ionicSideMenuDelegate) {
    $scope.$watch(function(){
    return $ionicSideMenuDelegate.getOpenRatio();
    }, function(newValue, oldValue) {
    if (newValue == 0){
    $scope.hideLeft = true;
    } else{
    $scope.hideLeft = false;
    }
    });
    }])

4 Likes