ionicSideMenuDelegate not working properly


#1

Hi!
when i logout by using side menu i am getting the following error and menu items will become un responsive
when i did the same action by dragging it is working fine.
index.html





                <ion-nav-buttons side="left">
                    <button class="button button-icon button-clear ion-navicon" ng-click="toggleLeft()">
                    </button>
                </ion-nav-buttons>
                <ion-nav-view name="menuContent"></ion-nav-view>
            </ion-side-menu-content>
            <ion-side-menu side="left">
                <ion-header-bar class="bar-calm">
                    <h1 class="title">My Health</h1>
                </ion-header-bar>
                <ion-content class="has-header has-footer">
                    <ul class="list">
        	            <a class="item item-icon-left"  menu-toggle="left" ng-click="home()"><i class="icon ion-home"></i>Home</a>                            
                        <a class="item item-icon-left"  menu-toggle="left" href="#/evaidya/doctors"><i class="icon ion-android-friends"></i>New Consultation</a>                           
        	            <a  class="item item-icon-left" menu-toggle="left" ng-click="logout()"><i class="icon ion-log-out"></i>Logout</a>
                    </ul>
                </ion-content>
            </ion-side-menu>
        </ion-side-menus>

index.js
$scope.logout = function() {
Auth.logout(function()
{
$location.path(’/home’);
});
}
Service:
logout: function(success, error) {
$http.post(APIUrl + ‘/logout’).success(function(){

                clearCurrentUser({
                    username: '',
                    role: userRoles.public
                });
                success();
            }).error(error);

},
Iam not sure what causing the error when i went through menu item. Please help me where iam doing the mistake.


#2

Hey,

May you build a codepen for us?

Thanks.


#3

I resolved the above problem by replacing the ng-click=“toggleLeft()” with menu-toggle=“left” on the button click,now it is working fine
<button class=“button button-icon button-clear ion-navicon” ng-click=“toggleLeft()”>


#4

Strange, because if you toggleLeft function is correct it should also work.


#5

It works, but the click events won’t work(I mean the page becomes unresponsive)