Ng-if doesn't resolve inside ion-nav-bar

This is most my html code, I left out the left ion-side-menu part. The first div ng-if doesn’t work but the second one does. Why?

    <ion-side-menus enable-menu-with-back-views="false" ng-controller="AppCtrl">      
        <ion-nav-bar class="bar-stable">
          <ion-nav-buttons side="left">
            <button class="button button-icon button-clear ion-navicon" menu-toggle="left">
          <div ng-if="hasSidebar">
            <ion-nav-buttons side="right">
              <button class="button button-icon button-clear ion-more" menu-toggle="right">
        <ion-nav-view name="menuContent"></ion-nav-view>

  <div ng-if="hasSidebar">

    <ion-side-menu side="right" ng-controller="SidebarCtrl">
      <ion-header-bar class="bar-stable">
        <h1 class="title">Right</h1>
        Sidebar Menu!



So it works as intended when I move the ng-if two lines below to the button. But still not when one line below to the ion-nav-buttons. Go figure…

Would you be able to provide a codepen to illustrate this?