title: AngularJS back button default to open to last ng-show
body: <p>I have three buttons on a page and depending on which on you click a different set of tabs is shown.  Once you make a selection a reset button is available to clear your choice. In these tabs a user is able to make a selection and is then taken to a results page.  What currently happens is, if a user clicks back via the browser the default view is the three original buttons but what I would like is the default view to be the last tab they were in before sending off for results. Is there a clever angular way to handle this?</p>
  
  <p>Example:
  <a href="http://plnkr.co/edit/2WZ12TKcHGXWmLhgD1vj" rel="nofollow">http://plnkr.co/edit/2WZ12TKcHGXWmLhgD1vj</a></p>
  
  <p>Buttons:</p>
  
  <pre><code>&lt;div class="btn-group btn-group-justified" role="group" aria-label="Qualifications"&gt;
    &lt;div class="btn-group" role="group"&gt;
      &lt;button type="button" class="btn btn-default" ng-click="tab = 1; showSelectorTabs=true; showSelectorButtons=true"&gt;Button 1&lt;/button&gt;
    &lt;/div&gt;
    &lt;div class="btn-group" role="group"&gt;
      &lt;button type="button" class="btn btn-default" ng-click="tab = 2; showSelectorTabs=true; showSelectorButtons=true"&gt;Button 2&lt;/button&gt;
    &lt;/div&gt;
    &lt;div class="btn-group" role="group"&gt;
      &lt;button disabled="true" type="button" class="btn btn-default" ng-click="tab = 3; showSelectorTabs=true; showSelectorButtons=true"&gt;Button 3&lt;/button&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>Tabs:
        </p>
  
  <pre><code>    &lt;tabset ng-show="tab == 1"&gt;
        &lt;ul class="nav nav-tabs"&gt;
          &lt;li role="presentation" class="active"&gt;&lt;a href="#"&gt;Home&lt;/a&gt;
          &lt;/li&gt;
          &lt;li role="presentation"&gt;&lt;a href="#"&gt;Profile&lt;/a&gt;
          &lt;/li&gt;
          &lt;li role="presentation"&gt;&lt;a href="#"&gt;Messages&lt;/a&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/tabset&gt;
  
  
      &lt;tabset ng-show="tab == 2"&gt;
        &lt;ul class="nav nav-tabs"&gt;
          &lt;li role="presentation" class="active"&gt;&lt;a href="#"&gt;Home&lt;/a&gt;
          &lt;/li&gt;
          &lt;li role="presentation"&gt;&lt;a href="#"&gt;Profile&lt;/a&gt;
          &lt;/li&gt;
          &lt;li role="presentation"&gt;&lt;a href="#"&gt;Messages&lt;/a&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/tabset&gt;
  
      &lt;tabset ng-show="tab == 3"&gt;
        &lt;ul class="nav nav-tabs"&gt;
          &lt;li role="presentation" class="active"&gt;&lt;a href="#"&gt;Home&lt;/a&gt;
          &lt;/li&gt;
          &lt;li role="presentation"&gt;&lt;a href="#"&gt;Profile&lt;/a&gt;
          &lt;/li&gt;
          &lt;li role="presentation"&gt;&lt;a href="#"&gt;Messages&lt;/a&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/tabset&gt;
    &lt;/div&gt;
  </code></pre>