title: Use android back button on device to return to main view in Framework7 app?
body: <p>I have recently built an app using framework7 and cordova. My app consists of a single html file which has all the views in it. To navigate between the views, a back button is present at the top on each child view.</p>
  
  <p>If a person presses the back button on the device, the app will be closed. </p>
  
  <p>How can I use the back button to get to the main page when I'm in the child pages?</p>
  
  <p>I have read the router API on the framework7 website but it is really confusing and does not seem to work. Here is what I'm trying:</p>
  
  <pre><code>&lt;html&gt;
    &lt;head&gt;...&lt;/head&gt;
    &lt;body&gt;
      ...
      &lt;!-- Views --&gt;
      &lt;div class="views"&gt;
        &lt;!-- View --&gt;
        &lt;div class="view view-main"&gt;
          &lt;!-- Pages --&gt;
          &lt;div class="pages"&gt;
            &lt;!-- Home page --&gt;
            &lt;div class="page" data-page="index"&gt;
              &lt;div class="page-content"&gt;
                &lt;p&gt;Home page&lt;/p&gt;
              &lt;/div&gt;
            &lt;/div&gt;
  
            &lt;!-- About page --&gt;
            &lt;div class="page cached" data-page="about"&gt;
              &lt;div class="page-content"&gt;
                &lt;p&gt;About page&lt;/p&gt;
              &lt;/div&gt;
            &lt;/div&gt;
  
            &lt;!-- Services page --&gt;
            &lt;div class="page cached" data-page="services"&gt;
              &lt;div class="page-content"&gt;
                &lt;p&gt;Services page&lt;/p&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      ...
    &lt;/body&gt;
  &lt;/html&gt;
  
  // Initialize App  
  var myApp = new Framework7();
  
  // Initialize View          
  var mainView = myApp.addView('.view-main')          
  
  // Load about page:
  mainView.router.load({pageName: 'about'});
  </code></pre>
  
  <p>Please note that I want to use the physical button found on the device to navigate to the main view when I'm in another div.</p>
  
  <p>Please help.</p>