导航丸下拉

时间:2014-12-11 08:38:04

标签: javascript css angularjs twitter-bootstrap

我想在AngularJS中使用Tabs。在这些选项卡中,我想添加Dropdown按钮。为此,我使用ui-bootstrap。 AngularJS版本:1.2.27 / angular.min.js Bootstrap版本:ui-bootstrap-tpls-0.12.0.min.js

我的代码导航nav-pills的代码:

<ul class="nav nav-pills">
      <li ng-repeat="project in projects | orderBy:'column'" ng-class="{ active: isSet(project.column) }">
        <!--<a href ng-click="setTab(project.column)">{{project.name}}</a>   -->
        <!-- Split button -->
        <div class="btn-group" dropdown>
          <button type="button" class="btn btn-primary" ng-click="setTab(project.column)">
            {{project.name}}
          </button>
          <button type="button" class="btn btn-primary dropdown-toggle" dropdown-toggle>
            <span class="caret"></span>
            <span class="sr-only">Split button!</span>
          </button>
          <ul class="dropdown-menu" role="menu">
            <li>
              <a href="#">Löschen</a>
            </li>
            <li>
              <a href="#">Umbenennen</a>
            </li>
          </ul>
        </div>
      </li>
      <li ng-class="{ active: isSet(0) }">
        <a href ng-click="openNewProjectForm()"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></a>
      </li>
    </ul>

我总是得到以下错误:

TypeError: undefined is not a function
at link (http://localhost:8080/Scripts/ui-bootstrap-tpls-0.12.0.min.js:8:24738)
at J (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.27/angular.min.js:54:373)
at g (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.27/angular.min.js:47:256)
at J (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.27/angular.min.js:54:314)
at g (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.27/angular.min.js:47:256)
at https://ajax.googleapis.com/ajax/libs/angularjs/1.2.27/angular.min.js:46:377
at https://ajax.googleapis.com/ajax/libs/angularjs/1.2.27/angular.min.js:48:217
at w (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.27/angular.min.js:52:29)
at https://ajax.googleapis.com/ajax/libs/angularjs/1.2.27/angular.min.js:202:219
at Object.fn (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.27/angular.min.js:109:293) <div class="btn-group" dropdown="">

我无法从错误中解决任何信息...

有什么想法吗?

0 个答案:

没有答案