title: Conditionally hide menu button in ionic framework outside <ion-view>
body: <p>In the ionic framework I am trying to hide the menu button conditionally. For other reasons I had to split the menu in its own controller (I don't want to completly re-render the menu and header bar on a refresh), so the header is not in ion-view. I created a watcher on the conditional variable (a stateparam) in the controller of the header. The console log outputs the conditional variable correctly, but the view is not updated (the menu button is always showing).</p>
  
  <p>This is the template:</p>
  
  <pre><code>&lt;ion-side-menus&gt;
      &lt;ion-side-menu-content&gt;
          &lt;ion-nav-bar class="bar-stable nav-title-slide-ios7"&gt;
              &lt;ion-nav-back-button ng-if="!isHome" class="button-clear"&gt;&lt;i class="icon ion-ios7-arrow-back"&gt;&lt;/i&gt;Back&lt;/ion-nav-back-button&gt;
              &lt;button ng-if="isHome" menu-toggle="left" class="button button-icon icon ion-navicon"&gt;&lt;/button&gt;
              &lt;h1 class="title"&gt;Title&lt;/h1&gt;
  
          &lt;/ion-nav-bar&gt;
      &lt;ion-nav-view name="menuContent" animation="slide-left-right"&gt;&lt;/ion-nav-view&gt;
  &lt;/ion-side-menu-content&gt;
  
  ...
  &lt;/ion-side-menus&gt;
  </code></pre>
  
  <p>And in the controller:</p>
  
  <pre><code>$scope.$watch(function(){
      return $stateParams.contentUrl;
  },
      function(newVal){
          console.log(newVal);
          if(!newVal || newVal === 'someParam'){
              $timeout(function(){
                  $scope.$apply(function(){
                      $scope.isHome = true;
                  });
                  console.log("home");
              });
          } else {
              $timeout(function(){
                  $scope.$apply(function(){
                      $scope.isHome = false;
                  });
                  console.log("not home");
              });
          }
      });
  </code></pre>
  
  <p>Is there an easier way? Or am I missing something here?</p>