title: Ionic framework ionicView.entered event fired twice
body: <p>I'm playing with this ionicView events that are fired whenever the views become active, and I'm using the side menu template that you can re-use when creating the project. It seems that if I put a listener for the $ionicView.entered event in the AppCtrl (the one used by the side menu template, which belongs to an abstract state in the ui-router configuration) it gets called twice in a row for any of the subviews (like, when using app.someotherview as a state). </p>
  
  <p>I don't know if this is the expected behavior because from the documentation I would expect it to only fire once, no matter if I change the subview (the menuContent view). </p>
  
  <p>I'd like to know if this is expected behavior and if so, how do I get to have an event fired only once every time it gets to show the side menu template.</p>
  
  <p>This is what I've got written:</p>
  
  <p>This is from the application module:</p>
  
  <pre><code>.config(function($stateProvider, $urlRouterProvider, $httpProvider) {
    $stateProvider
  
    .state('app', {
      url: "/app",
      abstract: true,
      templateUrl: "templates/menu.html",
      controller: 'AppCtrl'
    })
  
    .state('app.overview', {
      url: "/overview",
      views: {
        'menuContent': {
          templateUrl: "templates/overview.html",
          controller: 'OverviewCtrl'
        }
      }
    })
  
    .state('login', {
      url: "/login",
      templateUrl: "templates/identificationscreen.html",
      controller: "IdentificationCtrl"
    })
  
    .state('app.agenda', {
      url: "/agenda",
      views: {
        'menuContent': {
          templateUrl: "templates/agenda.html",
          controller: 'AgendaCtrl'
        }
      }
    });
  
    $httpProvider.interceptors.push('credentialsInjector');
  
    // if none of the above states are matched, use this as the fallback
    $urlRouterProvider.otherwise('/login'); 
  </code></pre>
  
  <p>Then the AppCtrl is this:</p>
  
  <pre><code>angular.module('dashboard.controllers.app', [])
  .controller('AppCtrl', function($scope, $ionicModal, $timeout, $ionicSideMenuDelegate, authService, $state) {
      $scope.logout = function() {
          authService.logout();
          $state.go('login');
      };
  
      $scope.$on('$ionicView.enter', function(){ //This is fired twice in a row
          console.log("App view (menu) entered.");
          console.log(arguments); 
      });
  
      $scope.$on('$ionicView.leave', function(){ //This just one when leaving, which happens when I logout
          console.log("App view (menu) leaved.");
          console.log(arguments);
      });
  }); 
  </code></pre>
  
  <p>The menu template:</p>
  
  <pre><code>&lt;ion-side-menus enable-menu-with-back-views="false"&gt;
    &lt;ion-side-menu-content edge-drag-threshold="true"&gt;
      &lt;ion-nav-bar class="bar-stable"&gt;
        &lt;ion-nav-back-button&gt;
        &lt;/ion-nav-back-button&gt;
        &lt;ion-nav-buttons side="left"&gt;
          &lt;button class="button button-icon button-clear ion-navicon" menu-toggle="left"&gt;
          &lt;/button&gt;
        &lt;/ion-nav-buttons&gt;
      &lt;/ion-nav-bar&gt;
      &lt;ion-nav-view name="menuContent"&gt;&lt;/ion-nav-view&gt;
    &lt;/ion-side-menu-content&gt;
  
    &lt;ion-side-menu side="left"&gt;
      &lt;ion-header-bar class="bar-stable"&gt;
        &lt;h1 class="title"&gt;APPoint!&lt;/h1&gt;
      &lt;/ion-header-bar&gt;
      &lt;ion-content&gt;
        &lt;ion-list&gt;
          &lt;ion-item nav-clear menu-close href="#/app/overview"&gt;
            Overview
          &lt;/ion-item&gt;
          &lt;ion-item nav-clear menu-close href="#/app/agenda"&gt;
            Agenda
          &lt;/ion-item&gt;
          &lt;ion-item nav-clear menu-close ng-click="logout()"&gt;
            Logout
          &lt;/ion-item&gt;
        &lt;/ion-list&gt;
      &lt;/ion-content&gt;
    &lt;/ion-side-menu&gt;
  &lt;/ion-side-menus&gt;
  </code></pre>