title: href causes unintended page reload with Angularjs and Twitter Bootstrap
body: <p>I am working on a project that uses Angularjs and Twitter Bootstrap.</p>
  
  <p>Bootstrap uses # to toggle components such as popover, modal etc.
  for example:</p>
  
  <pre><code>&lt;a href="#myModal" role="button" class="btn" data-toggle="modal"&gt;Launch demo modal&lt;/a&gt;
  
  &lt;!-- Modal --&gt;
  &lt;div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt;
    &lt;div class="modal-header"&gt;
      &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;×&lt;/button&gt;
      &lt;h3 id="myModalLabel"&gt;Modal header&lt;/h3&gt;
    &lt;/div&gt;
    &lt;div class="modal-body"&gt;
      &lt;p&gt;One fine body…&lt;/p&gt;
    &lt;/div&gt;
    &lt;div class="modal-footer"&gt;
      &lt;button class="btn" data-dismiss="modal" aria-hidden="true"&gt;Close&lt;/button&gt;
      &lt;button class="btn btn-primary"&gt;Save changes&lt;/button&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The problem is when I click on button with such href attribute, it causes full page reload, which means, everything in current page is lost.
  <strong>Is there a way to prevent this?</strong></p>
  
  <p>some <strong>extra</strong> info:</p>
  
  <p>when i hover on the button, the url is weird. for example, my current page's url is</p>
  
  <pre><code>localhost:8080/#/account
  </code></pre>
  
  <p>the button's href is</p>
  
  <pre><code>href="#myModal"
  </code></pre>
  
  <p>I expect to see url</p>
  
  <pre><code>localhost:8080/#/account#myModal
  </code></pre>
  
  <p>However, what I see is </p>
  
  <pre><code>localhost:8080/#myModal
  </code></pre>
  
  <p>I am not sure if this is related to my problem.</p>
  
  <p>Thanks in advance!</p>
  
  <p><em><strong>EDIT 1</em></strong></p>
  
  <p>I have seen the other post that <em>Stewie</em> talked about. It explains html5mode and hashbang in angularjs, but it doesn't really solve my problem.</p>
  
  <p>I tried putting html5mode, and it still reloads the page when i click on the button</p>