title: AngularJS with Bootstrap 3 navbar not collapsing on small device and hash tag links
body: <p>So the problem comes when trying the project I'm working on the phone, the links I have inside my <code>navbar</code> are all with hash tag links (#) since it's AngularJS... Now I did find a way to make it to work perfectly in jQuery</p>
  
  <pre><code>$('.nav li a').not('.dropdown-toggle').on('click', function(){
      $('.navbar-ex1-collapse').removeClass('in').addClass('collapse');
  });
  </code></pre>
  
  <p>but since they always say to stop using plain jQuery or DOM manipulation...so how am I suppose to do this? I'm new to AngularJS and I'm not to good at starting to create my own directive, or should I just have $watch? but then how can I watch a certain class to be clicked then? I tried to do this example <br/><a href="https://stackoverflow.com/questions/14741988/twitter-boostrap-navbar-with-angular-js-collapse-not-functioning">twitter-boostrap-navbar-with-angular-js-collapse-not-functioning</a> <br/>but it was made specifically for Bootstrap 2.3 and some properties have changed too, so I'm getting a little confused. I could leave the jQuery, but you know...I'm trying to learn the proper way of doing... :)</p>
  
  <p>Oh and if that help, my <code>navbar</code> Bootstrap 3 menu looks like this</p>
  
  <pre><code>&lt;nav class="navbar navbar-default navbar-fixed-top" role="navigation"&gt;
      &lt;div class="container"&gt;
          &lt;!-- Brand and toggle get grouped for better mobile display --&gt;
          &lt;div class="navbar-header"&gt;
              &lt;button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"&gt;
                  &lt;span class="sr-only"&gt;Toggle navigation&lt;/span&gt;
                  &lt;span class="icon-bar"&gt;&lt;/span&gt;
                  &lt;span class="icon-bar"&gt;&lt;/span&gt;
                  &lt;span class="icon-bar"&gt;&lt;/span&gt;
              &lt;/button&gt;
          &lt;/div&gt;
  
        &lt;!-- Collect the nav links, forms, and other content for toggling --&gt;
        &lt;div class="collapse navbar-collapse navbar-ex1-collapse"&gt;
          &lt;ul class="nav navbar-nav"&gt;
              &lt;li class="dropdown"&gt;
                  &lt;a href="#" class="dropdown-toggle" data-toggle="dropdown"&gt;Portfolio&lt;b class="caret"&gt;&lt;/b&gt;&lt;/a&gt;
                  &lt;ul class="dropdown-menu"&gt;
                      &lt;li&gt;&lt;a href="#/new"&gt;Add&lt;/a&gt;&lt;/li&gt;
                      &lt;li&gt;&lt;a href="#/undo"&gt;Undo&lt;/a&gt;&lt;/li&gt;
                      &lt;li&gt;&lt;a href="#/list"&gt;List&lt;/a&gt;&lt;/li&gt;
                  &lt;/ul&gt;
              &lt;/li&gt; 
          &lt;/ul&gt;
        &lt;/div&gt;&lt;!-- /.navbar-collapse --&gt;
      &lt;/div&gt;&lt;!-- /.container --&gt;
  &lt;/nav&gt;
  </code></pre>