How to pass parameters in the Menu


#1

Hello,

I use the $ionicSideMenuDelegate service to control menu.
Now in my controller I have

.controller(‘NavCtrl’, function($scope, $ionicSideMenuDelegate) {
$scope.showMenu = function () {
$scope.totalUnread = 2;
$ionicSideMenuDelegate.toggleLeft();
};
})`

I would like to see the variable {{totalUnread}} in the menu

<ion-side-menus>
    <ion-side-menu-content ng-controller="NavCtrl">
      <ion-nav-bar class="bar-positive">
        <ion-nav-back-button class="button-icon ion-arrow-left-c">
        </ion-nav-back-button>
        <ion-nav-buttons side="left">
          <button class="button button-icon button-clear ion-navicon" ng-click="showMenu()">
          </button>
        </ion-nav-buttons>
      </ion-nav-bar>
      <ion-nav-view animation="slide-left-right"></ion-nav-view>
    </ion-side-menu-content> 

    <ion-side-menu side="left">
      <ion-header-bar class="bar bar-header bar-assertive">
        <h1 class="title">Menu</h1>
      </ion-header-bar>
      <ion-content has-header="true">
        <ul class="list">
          <li>
            {{totalUnread}}
          </li>
        </ul>
      </ion-content>
    </ion-side-menu>
  </ion-side-menus>

How can I do ?