title: Onsen ui error "TypeError: Cannot read property 'pushPage' of null"
body: <p>Im developing with onsen ui + angularjs. My app have to ways to access to different sections, one is for "home" page and another is for lateral menu. When i use "home" menu and i access to any items of my list works perfect, but if i use lateral menu and i try to access to any items chrome debugger show me this error:</p>
  
  <p><em>TypeError: Cannot read property 'pushPage' of null
      at Scope.$scope.showPost (<a href="http://recorramisiones.com.ar/rutadelaselva/app2/js/app.js:103:26" rel="nofollow">http://recorramisiones.com.ar/rutadelaselva/app2/js/app.js:103:26</a>)
      at $parseFunctionCall (<a href="http://recorramisiones.com.ar/rutadelaselva/app2/lib/onsen/js/angular/angular.js:12133:18" rel="nofollow">http://recorramisiones.com.ar/rutadelaselva/app2/lib/onsen/js/angular/angular.js:12133:18</a>)
      at <a href="http://recorramisiones.com.ar/rutadelaselva/app2/lib/onsen/js/onsenui.js:15815:21" rel="nofollow">http://recorramisiones.com.ar/rutadelaselva/app2/lib/onsen/js/onsenui.js:15815:21</a>
      at Scope.$get.Scope.$eval (<a href="http://recorramisiones.com.ar/rutadelaselva/app2/lib/onsen/js/angular/angular.js:14123:28" rel="nofollow">http://recorramisiones.com.ar/rutadelaselva/app2/lib/onsen/js/angular/angular.js:14123:28</a>)
      at Scope.$get.Scope.$apply (<a href="http://recorramisiones.com.ar/rutadelaselva/app2/lib/onsen/js/angular/angular.js:14221:23" rel="nofollow">http://recorramisiones.com.ar/rutadelaselva/app2/lib/onsen/js/angular/angular.js:14221:23</a>)
      at HTMLElement.click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste.split.forEach.ngEventDirectives.(anonymous function).compile.listener (<a href="http://recorramisiones.com.ar/rutadelaselva/app2/lib/onsen/js/onsenui.js:15814:25" rel="nofollow">http://recorramisiones.com.ar/rutadelaselva/app2/lib/onsen/js/onsenui.js:15814:25</a>)
      at HTMLElement.eventHandler (<a href="http://recorramisiones.com.ar/rutadelaselva/app2/lib/onsen/js/angular/angular.js:3013:21" rel="nofollow">http://recorramisiones.com.ar/rutadelaselva/app2/lib/onsen/js/angular/angular.js:3013:21</a>)</em></p>
  
  <p>My project url: <a href="http://recorramisiones.com.ar/rutadelaselva/app2/" rel="nofollow">http://recorramisiones.com.ar/rutadelaselva/app2/</a></p>
  
  <p>Screenshot: <a href="http://puu.sh/g4Zr5.jpg" rel="nofollow">http://puu.sh/g4Zr5.jpg</a></p>
  
  <p>menu.html (lateral menu):</p>
  
  <pre><code>&lt;ons-page modifier="menu-page"&gt;
   &lt;ons-toolbar modifier="transparent"&gt;&lt;/ons-toolbar&gt;
  
   &lt;ons-list class="menu-list"&gt;
   &lt;ons-list-item class="menu-item" ng-click="menu.setMainPage('home.html', {closeMenu: true})"&gt;
    &lt;ons-icon icon="fa-home" fixed-width="true"&gt;&lt;/ons-icon&gt;
    Inicio
  &lt;/ons-list-item&gt;
  &lt;ons-list-item class="menu-item" ng-click="menu.setMainPage('areas.html', {closeMenu: true})"&gt;
    &lt;ons-icon icon="fa-leaf" fixed-width="true"&gt;&lt;/ons-icon&gt;
     Areas Naturales
  &lt;/ons-list-item&gt;
  &lt;ons-list-item class="menu-item" ng-click="menu.setMainPage('informes.html', {closeMenu: true})"&gt;
    &lt;ons-icon icon="fa-info-circle" fixed-width="true"&gt;&lt;/ons-icon&gt;
    Informes Turísticos
  &lt;/ons-list-item&gt;
  &lt;ons-list-item class="menu-item" ng-click="menu.setMainPage('atractivos.html', {closeMenu: true})"&gt;
    &lt;ons-icon icon="fa-camera" fixed-width="true"&gt;&lt;/ons-icon&gt;
     Atractivos y Actividades
  &lt;/ons-list-item&gt;
  &lt;ons-list-item class="menu-item" ng-click="menu.setMainPage('alojamientos.html', {closeMenu: true})"&gt;
    &lt;ons-icon icon="fa-building" fixed-width="true"&gt;&lt;/ons-icon&gt;
    Alojamientos
  &lt;/ons-list-item&gt;    
  &lt;ons-list-item class="menu-item" ng-click="menu.setMainPage('hospitales.html', {closeMenu: true})"&gt;
    &lt;ons-icon icon="fa-plus-square" fixed-width="true"&gt;&lt;/ons-icon&gt;
     Hospitales y Servicios
  &lt;/ons-list-item&gt;
  &lt;ons-list-item class="menu-item" ng-click="menu.setMainPage('markers.html', {closeMenu: true})"&gt;
    &lt;ons-icon icon="fa-map-marker" fixed-width="true"&gt;&lt;/ons-icon&gt;
    Mapa
  &lt;/ons-list-item&gt;
  &lt;/ons-list&gt;
  &lt;/ons-page&gt;
  </code></pre>
  
  <p>home.html (home menu)</p>
  
  <pre><code>&lt;ons-navigator animation="slide" var="gallery"&gt; 
    &lt;ons-page&gt;
      &lt;ons-toolbar modifier="opacity"&gt;
        &lt;div class="left"&gt;
          &lt;ons-toolbar-button ng-click="menu.toggle()"&gt;&lt;ons-icon icon="ion-navicon-round" fixed-width="false"&gt;&lt;/ons-icon&gt;&lt;/ons-toolbar-button&gt;
        &lt;/div&gt;
        &lt;div class="center"&gt;Ruta de la Selva&lt;/div&gt;
      &lt;/ons-toolbar&gt;
      &lt;div class="app-page"&gt;
        &lt;div class="app-page-menu"&gt;
          &lt;ons-row&gt;
            &lt;ons-col&gt;
              &lt;ons-button modifier="clean" ng-click="gallery.pushPage('alojamientos.html');"&gt;
                &lt;img src="img/alojamientos.jpg"&gt;
                &lt;p&gt;Alojamientos&lt;/p&gt;
              &lt;/ons-button&gt;
            &lt;/ons-col&gt;
          &lt;/ons-row&gt;
          &lt;ons-row&gt;
            &lt;ons-col&gt;
              &lt;ons-button modifier="clean" ng-click="gallery.pushPage('informes.html');"&gt;
                &lt;img src="img/informes.jpg"&gt;
                &lt;p&gt;Informes Turísticos&lt;/p&gt;
              &lt;/ons-button&gt;
            &lt;/ons-col&gt;
          &lt;/ons-row&gt;
          &lt;ons-row&gt;
            &lt;ons-col&gt;
              &lt;ons-button modifier="clean" ng-click="gallery.pushPage('atractivos.html');"&gt;
                &lt;img src="img/actividades.jpg"&gt;
                &lt;p&gt;Atractivos y Actividades&lt;/p&gt;
              &lt;/ons-button&gt;
            &lt;/ons-col&gt;
          &lt;/ons-row&gt;
          &lt;ons-row&gt;
            &lt;ons-col&gt;
              &lt;ons-button modifier="clean" ng-click="gallery.pushPage('areas.html');"&gt;
                &lt;img src="img/areas.jpg"&gt;
                &lt;p&gt;Áreas Naturales&lt;/p&gt;
              &lt;/ons-button&gt;
            &lt;/ons-col&gt;
          &lt;/ons-row&gt;
          &lt;ons-row&gt;
            &lt;ons-col&gt;
              &lt;ons-button modifier="clean" ng-click="gallery.pushPage('dishes.html');"&gt;
                &lt;img src="img/hospitales.jpg"&gt;
                &lt;p&gt;Hospitales y Servicios&lt;/p&gt;
              &lt;/ons-button&gt;
            &lt;/ons-col&gt;
          &lt;/ons-row&gt;
          &lt;ons-row&gt;
            &lt;ons-col&gt;
              &lt;ons-button modifier="clean" ng-click="gallery.pushPage('markers.html');"&gt;
                &lt;img src="img/map.jpg"&gt;
                &lt;p&gt;Mapa&lt;/p&gt;
              &lt;/ons-button&gt;
            &lt;/ons-col&gt;
          &lt;/ons-row&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/ons-page&gt;
  &lt;/ons-navigator&gt;
  </code></pre>
  
  <p>Any idea?</p>