ionic replace menu header content in search page

I have some problem. I really can't understand how it work.

In app.js i create state like this:

`...
 .config(function ($stateProvider, $urlRouterProvider) {
    $stateProvider
        .state('app', {
            url: "/app",
            abstract: true,
            controller: 'AppController',
            templateUrl: "templates/menu.html"
        })
        .state('app.search', {
            url: '/search',
            views: {
                'searchContent' : '<h1>ANTOHER CONTENT</h1>',
                'menuContent': {
                    templateUrl: 'templates/test.html',
                    controller: 'TestController'
                }
            }
        })
...`

You can see, two views "searchContent" and "menuContent". Then i create two templates:

In this template, for tags, i added two names like in app.js menu.html:

<ion-side-menus enable-menu-with-back-views="false">
    <ion-side-menu-content>
        <ion-nav-bar class="bar-stable" name="searchContent">
            <ion-nav-back-button>
            </ion-nav-back-button>

            <ion-nav-buttons side="left">
                <button class="button button-icon button-clear ion-navicon" menu-toggle="left">
                </button>
            </ion-nav-buttons>
        </ion-nav-bar>
        <ion-nav-view name="menuContent"></ion-nav-view>
    </ion-side-menu-content>

    <ion-side-menu side="left">
        <ion-header-bar class="bar-stable">
            <h1 class="title">Left</h1>
        </ion-header-bar>
        <ion-content>
            <ion-list>
                <ion-item menu-close href="#/app/search">
                    Search
                </ion-item>
            </ion-list>
        </ion-content>
    </ion-side-menu>
</ion-side-menus>

test.html:

<ion-view>
    <ion-content>
        Some content
    </ion-content>
</ion-view>

index.html:

...
    <body ng-app="starter">
        <ion-nav-view></ion-nav-view>
    </body>
...

But on search page, searchContent no replaced by "<h1>ANTOHER CONTENT</h1>". How to fix this ?

First of all <ion-nav-bar></ion-nav-bar> is not used for rendering views and content but for the top navigation. Views are for <ion-view> or <ion-nav-view>

Secondly, In my opinion... One view is sufficient. I'm not sure what you were trying to achieve with the first content but if you just want to change the title of the page you can try this...

<ion-nav-bar class="bar-stable" name="searchContent">
    <ion-nav-back-button>
    </ion-nav-back-button>

    <h1>ANTOHER CONTENT</h1>

    <ion-nav-buttons side="left">
        <button class="button button-icon button-clear ion-navicon" menu-toggle="left">
        </button>
    </ion-nav-buttons>
</ion-nav-bar>

OR

use <ion-nav-title></ion-nav-title> inside your test.html or any page you want... http://ionicframework.com/docs/api/directive/ionNavTitle/

Hope this helps! :D