title: How do I set my (open) side menu to be the default view in Ionic mobile app
body: <p><strong>My setup:</strong></p>
  
  <pre><code>$ ionic info
  
  Your system information:
  
  Cordova CLI: 6.2.0
  Gulp version:  CLI version 3.9.1
  Gulp local:  
  Ionic CLI Version: 2.0.0
  Ionic App Lib Version: 2.0.0-beta.20
  OS: Distributor ID: LinuxMint Description:  Linux Mint 17.1 Rebecca 
  Node Version: v0.12.2
  </code></pre>
  
  <p>I am building an Ionic based mobile app for android. This app has both a sidemenu &amp; tabbed bar component. I would like them open sidemenu to be the default view that loads up when the app is launched. Below is my routes.js file. I have tinkered with $urlRouterProvider.otherwise() and tried all kinds of things but I can't get it to launch with the side menu open. Please assist. Thanks</p>
  
  <p><strong>routes.js</strong></p>
  
  <pre><code>angular.module('app.routes', [])
  
  .config(function($stateProvider, $urlRouterProvider) {
  
    // Ionic uses AngularUI Router which uses the concept of states
    // Learn more here: https://github.com/angular-ui/ui-router
    // Set up the various states which the app can be in.
    // Each state's controller can be found in controllers.js
    $stateProvider
  
  
  
        .state('menu.latestICDLNews', {
      url: '/news',
      views: {
        'side-menu21': {
          templateUrl: 'templates/latestICDLNews.html',
          controller: 'latestICDLNewsCtrl'
        }
      }
    })
  
    .state('menu.iCDLModules', {
      url: '/modules',
      views: {
        'side-menu21': {
          templateUrl: 'templates/iCDLModules.html',
          controller: 'iCDLModulesCtrl'
        }
      }
    })
  
    .state('menu.trainingExams', {
      url: '/training',
      views: {
        'side-menu21': {
          templateUrl: 'templates/trainingExams.html',
          controller: 'trainingExamsCtrl'
        }
      }
    })
  
    .state('menu', {
      url: '/side-menu',
      templateUrl: 'templates/menu.html',
      abstract:true
    })
  
    .state('menu.accreditedICDLCenters', {
      url: '/centers',
      views: {
        'side-menu21': {
          templateUrl: 'templates/accreditedICDLCenters.html',
          controller: 'accreditedICDLCentersCtrl'
        }
      }
    })
  
    .state('menu.becomeACenter', {
      url: '/becomecenter',
      views: {
        'side-menu21': {
          templateUrl: 'templates/becomeACenter.html',
          controller: 'becomeACenterCtrl'
        }
      }
    })
  
    .state('menu.fAQS', {
      url: '/faq',
      views: {
        'side-menu21': {
          templateUrl: 'templates/fAQS.html',
          controller: 'fAQSCtrl'
        }
      }
    })
  
    .state('menu.credits', {
      url: '/credits',
      views: {
        'side-menu21': {
          templateUrl: 'templates/credits.html',
          controller: 'creditsCtrl'
        }
      }
    })
  
    .state('menu.introductoryModules', {
      url: '/introductory-modules',
      views: {
        'side-menu21': {
          templateUrl: 'templates/introductoryModules.html',
          controller: 'introductoryModulesCtrl'
        }
      }
    })
  
    .state('menu.baseModules', {
      url: '/base-modules',
      views: {
        'side-menu21': {
          templateUrl: 'templates/baseModules.html',
          controller: 'baseModulesCtrl'
        }
      }
    })
  
    .state('menu.standardModules', {
      url: '/standard-modules',
      views: {
        'side-menu21': {
          templateUrl: 'templates/standardModules.html',
          controller: 'standardModulesCtrl'
        }
      }
    })
  
    .state('menu.advancedModules', {
      url: '/advanced-modules',
      views: {
        'side-menu21': {
          templateUrl: 'templates/advancedModules.html',
          controller: 'advancedModulesCtrl'
        }
      }
    })
  
    .state('menu.contactUs', {
      url: '/contactus',
      views: {
        'side-menu21': {
          templateUrl: 'templates/contactUs.html',
          controller: 'creditsCtrl'
        }
      }
    })
  
  $urlRouterProvider.otherwise('/side-menu/modules')
  
  });
  </code></pre>
  
  <p><strong>2nd App</strong></p>
  
  <p><strong>routes.js:</strong></p>
  
  <pre><code>angular.module('app.routes', [])
  
  .config(function($stateProvider, $urlRouterProvider) {
  
    // Ionic uses AngularUI Router which uses the concept of states
    // Learn more here: https://github.com/angular-ui/ui-router
    // Set up the various states which the app can be in.
    // Each state's controller can be found in controllers.js
    $stateProvider
  
  
  
        .state('menu.latestICDLNews', {
      url: '/news',
      views: {
        'side-menu21': {
          templateUrl: 'templates/latestICDLNews.html',
          controller: 'latestICDLNewsCtrl'
        }
      }
    })
  
    .state('menu.iCDLModules', {
      url: '/modules',
      views: {
        'side-menu21': {
          templateUrl: 'templates/iCDLModules.html',
          controller: 'iCDLModulesCtrl'
        }
      }
    })
  
    .state('menu.trainingExams', {
      url: '/training',
      views: {
        'side-menu21': {
          templateUrl: 'templates/trainingExams.html',
          controller: 'trainingExamsCtrl'
        }
      }
    })
  
    .state('menu', {
      url: '/side-menu',
      templateUrl: 'templates/menu.html',
      abstract:true
    })
  
    .state('menu.accreditedICDLCenters', {
      url: '/centers',
      views: {
        'side-menu21': {
          templateUrl: 'templates/accreditedICDLCenters.html',
          controller: 'accreditedICDLCentersCtrl'
        }
      }
    })
  
    .state('menu.becomeACenter', {
      url: '/becomecenter',
      views: {
        'side-menu21': {
          templateUrl: 'templates/becomeACenter.html',
          controller: 'becomeACenterCtrl'
        }
      }
    })
  
    .state('menu.fAQS', {
      url: '/faq',
      views: {
        'side-menu21': {
          templateUrl: 'templates/fAQS.html',
          controller: 'fAQSCtrl'
        }
      }
    })
  
    .state('menu.credits', {
      url: '/credits',
      views: {
        'side-menu21': {
          templateUrl: 'templates/credits.html',
          controller: 'creditsCtrl'
        }
      }
    })
  
    .state('menu.introductoryModules', {
      url: '/introductory-modules',
      views: {
        'side-menu21': {
          templateUrl: 'templates/introductoryModules.html',
          controller: 'introductoryModulesCtrl'
        }
      }
    })
  
    .state('menu.baseModules', {
      url: '/base-modules',
      views: {
        'side-menu21': {
          templateUrl: 'templates/baseModules.html',
          controller: 'baseModulesCtrl'
        }
      }
    })
  
    .state('menu.standardModules', {
      url: '/standard-modules',
      views: {
        'side-menu21': {
          templateUrl: 'templates/standardModules.html',
          controller: 'standardModulesCtrl'
        }
      }
    })
  
    .state('menu.advancedModules', {
      url: '/advanced-modules',
      views: {
        'side-menu21': {
          templateUrl: 'templates/advancedModules.html',
          controller: 'advancedModulesCtrl'
        }
      }
    })
  
    .state('menu.contactUs', {
      url: '/contactus',
      views: {
        'side-menu21': {
          templateUrl: 'templates/contactUs.html',
          controller: 'creditsCtrl'
        }
      }
    })
  
  $urlRouterProvider.otherwise('/side-menu/modules')
  
  
  
  });
  </code></pre>
  
  <p><strong>menu.html:</strong></p>
  
  <pre><code>&lt;ion-side-menus enable-menu-with-back-views="false"&gt;
      &lt;ion-side-menu-content&gt;
          &lt;ion-nav-bar class="bar-calm"&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="side-menu21"&gt;&lt;/ion-nav-view&gt;
      &lt;/ion-side-menu-content&gt;
      &lt;ion-side-menu side="left" id="side-menu21"&gt;
          &lt;ion-header-bar class="bar-calm"&gt;
              &lt;div class="title"&gt;Menu&lt;/div&gt;
          &lt;/ion-header-bar&gt;
          &lt;ion-content padding="false" class="side-menu-left has-header"&gt;
              &lt;div class=""&gt;
                  &lt;img src="img/icdl.png" width="100%" height="auto" style="display: block; margin-left: auto; margin-right: auto;"&gt;
              &lt;/div&gt;
              &lt;ion-list id="menu-list3" class=" "&gt;
                  &lt;ion-item class="calm  " id="menu-list-item1" ui-sref="menu.latestICDLNews" menu-close=""&gt;Latest ICDL News&lt;/ion-item&gt;
                  &lt;ion-item class="calm  " id="menu-list-item2" ui-sref="menu.iCDLModules" menu-close=""&gt;ICDL Modules&lt;/ion-item&gt;
                  &lt;ion-item class="calm  " id="menu-list-item3" ui-sref="menu.trainingExams" menu-close=""&gt;ICDL Training &amp;amp; Exams&lt;/ion-item&gt;
                  &lt;ion-item class="calm  " id="menu-list-item4" href="#" onclick="window.open('http://www.icdlprofilezw.org/', '_system', 'location=yes'); return false;"&gt;ICDL Online Profile&lt;/ion-item&gt;
                  &lt;ion-item class="calm  " id="menu-list-item5" href="#" onclick="window.open('http://icdlafrica.org/find-a-test-centre', '_system', 'location=yes'); return false;" &gt;Accredited ICDL Centers&lt;/ion-item&gt; &lt;!-- ui-sref="menu.accreditedICDLCenters" menu-close="" --&gt;
                  &lt;ion-item class="calm  " id="menu-list-item6" ui-sref="menu.becomeACenter" menu-close=""&gt;Become an ICDL Center&lt;/ion-item&gt;
                  &lt;ion-item class="calm  " id="menu-list-item8" ui-sref="menu.fAQS" menu-close=""&gt;FAQ's&lt;/ion-item&gt;
                  &lt;ion-item class="calm  " id="menu-list-item10" href="/contactus" ui-sref="menu.contactUs" menu-close=""&gt;Contact Us&lt;/ion-item&gt;
                  &lt;ion-item class="calm  " id="menu-list-item9" ui-sref="menu.credits" menu-close=""&gt;Credits&lt;/ion-item&gt;
              &lt;/ion-list&gt;
          &lt;/ion-content&gt;
      &lt;/ion-side-menu&gt;
  &lt;/ion-side-menus&gt;
  </code></pre>