Reloading current child state from side menu causes loss of header


I’m creating a simple Ionic menu app and I would like to reload the current state from the side menu.Here’s the Plunkr illustrating the problem.

In the ‘Search’ state, I’m displaying the current time. The desired behavior is the following: when I click ‘Search’ from the side menu, the time is refreshed, i.e. the controller is reloaded. This should happen even when I’m already on the Search page.

To be able to reload the state, I changed two things:

  1. I disabled view caching in app.js config function: $ionicConfigProvider.views.maxCache(0);
  2. In menu.html, I’m passing ui-sref-opts to explicitly reload the state:
    <ion-item menu-close ui-sref="" ui-sref-opts="{reload: true}">

The result is that the time is indeed updated, however, the header of the view is gone!

Any suggestions as to what I’m doing wrong?

Below is the relevant setup. The only things different from the ionic menu starter template, are the ones I mentioned above.


.config(function($stateProvider, $urlRouterProvider, $ionicConfigProvider) {

    .state('app', {
          url: "/app",
          abstract: true,
          templateUrl: "menu.html",
          controller: 'AppCtrl'

        .state('', {
          url: "/search",
          views: {
            'menuContent' :{
              templateUrl: "search.html",
              controller: 'SearchCtrl'


  <ion-pane ion-side-menu-content>
    <ion-nav-bar class="bar-stable">
      <ion-nav-back-button class="button-clear"><i class="icon ion-chevron-left"></i> Back</ion-nav-back-button>
    <ion-nav-view name="menuContent" animation="slide-left-right"></ion-nav-view>

  <ion-side-menu side="left">
    <header class="bar bar-header bar-stable">
      <h1 class="title">Left</h1>
    <ion-content class="has-header">
        <ion-item nav-clear menu-close ui-sref="" ui-sref-opts="{reload: true}">
        <ion-item nav-clear menu-close href="#/app/browse">
        <ion-item nav-clear menu-close href="#/app/playlists">

search controller:
.controller(‘SearchCtrl’, function($scope) {
$ = new Date();