title: Angular UI, Bootstrap Navbar Collapse and Javascript
body: <p>I have trouble with UI-Router in many ways. I don't understand how it interacts with other frameworks.</p>
  
  <p>Namely, I am trying to implement Bootstrap 3's navbar collapse module, seen below:</p>
  
  <pre><code>&lt;div class="navbar navbar-inverse navbar-fixed-top" role="navigation"&gt;
    &lt;div class="container"&gt;
      &lt;div class="navbar-header"&gt;
        &lt;button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-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;a class="navbar-brand" href="#"&gt;Project name test&lt;/a&gt;
      &lt;/div&gt;
      &lt;div class="collapse navbar-collapse"&gt;
        &lt;ul class="nav navbar-nav"&gt;
          &lt;li class="active"&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#about"&gt;About&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#contact"&gt;Contact&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/div&gt;&lt;!--/.nav-collapse --&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This is straight from the Bootstrap website and it works fine when inside its own .html page.</p>
  
  <p>The issue is when I insert it into a UI-Router view. The collapsing action no longer works -- I'm guessing because the "data-target" function is somehow unable to find its target.</p>
  
  <p>How does one use Bootstrap 3 with Angular UI? The Angular UI Bootstrap package does not have a navbar module.</p>
  
  <p>The answer below is good. Here is a reference URL <a href="https://stackoverflow.com/questions/14741988/twitter-boostrap-navbar-with-angular-js-collapse-not-functioning?rq=1">Twitter Bootstrap Navbar with AngularJS - Collapse Not Functioning</a>.</p>