UI Bootstrap无法在ASP-MVC中运行

时间:2014-02-20 16:25:33

标签: asp.net-mvc twitter-bootstrap angular-ui-bootstrap

我正在尝试在具有标准“开箱即用”引导程序支持的VS2013 MVC项目中使用UI Bootstrap。

我已添加:'安装 - 包装Angular.UI.Bootstrap'在PM

在我的布局文件中添加了一个脚本标记:

并创造了一种依赖性:

var collegeApp = angular.module('collegeApp', ['ui.bootstrap']);
像这样的简单代码将无法运行:

   <accordion close-others="true">
        <accordion-group heading="Static Header, initially expanded" is-open="true">
            This content is straight in the template.
        </accordion-group>
    </accordion>

它说“手风琴”是一个未知的元素,并没有呈现任何东西......有没有人像我一样遇到这些“启动”问题,可以帮我一个忙吗?

1 个答案:

答案 0 :(得分:0)

更新对angular和bootstrap的引用后,它可以工作!

<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js"></script>
<script src="http://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.10.0.js"></script>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">