Prevent a hidden headerbar to be in DOM

I have 2 pages:

< ion-view hide-nav-bar=“true” title=“Login” cache-view=“false”>
< ion-view hide-nav-bar=“false” title=“HomePage” cache-view=“false”>

and in index.html:

<body ng-app="myapp">
       <ion-nav-bar>  
                     <ion-nav-back-button> </ion-nav-back-button>   
          </ion-nav-bar>
       <ion-nav-view></ion-nav-view>
</body>

When I am on homepage and I look into DOM I see :

< ion-nav-bar>
< div class=“nav-bar-block” nav-bar=“active”> - homepage hederbar
< div class=“nav-bar-block” nav-bar=“cached”> - login headerbar
< /ion-nav-bar>

How can I prevent the login headerbar to be in DOM because I don’t need it.

( I use ion-nav-bar in index.html because I will have many pages with header)