How to pass parameters in the Menu


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;

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

    <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-buttons side="left">
          <button class="button button-icon button-clear ion-navicon" ng-click="showMenu()">
      <ion-nav-view animation="slide-left-right"></ion-nav-view>

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

How can I do ?

1 Like