角UI的引导手风琴不工作 [英] Angular ui-bootstrap accordion not working

查看:133
本文介绍了角UI的引导手风琴不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是例如直接从结果复制
http://angular-ui.github.io/bootstrap/ 结果
不能在所有的工作,无论是在本地还是在plunker。不知道为什么。引导CSS加载,所以UI自举-tpls.min.js和angular.min.js(角度本身是工作得很好,虽然)。结果
这里的plunker:结果
http://plnkr.co/edit/15GWWFSUwab4VmaxfFPf 结果
我没有得到JS错误在浏览器中,但它不工作。结果
请帮忙。我需要得到这个工作在我的网站(即甚至当我写我自己的HTML / JS code手风琴不工作)。

An example copied directly from
http://angular-ui.github.io/bootstrap/
Does not work at all, neither locally nor in plunker. Don't know why. Bootstrap CSS is loaded, so is ui-bootstrap-tpls.min.js and angular.min.js (angular itself is working just fine though).
Here's the plunker:
http://plnkr.co/edit/15GWWFSUwab4VmaxfFPf
I am getting no js errors in a browser, yet it's not working.
Please help. I need to get this working on my website (i.e. the accordion doesn't work even when I write my own html/js code).

推荐答案

从演示站点创建的plunker完美的作品,刚刚创建从演示站点plunker:<一href=\"http://plnkr.co/edit/z9RQKgNBTRbigyQs7OGW?p=$p$pview\">http://plnkr.co/edit/z9RQKgNBTRbigyQs7OGW?p=$p$pview

A plunker created from the demo site works flawlessly, just created a plunker from the demo site: http://plnkr.co/edit/z9RQKgNBTRbigyQs7OGW?p=preview

在您的plunker你不声明作为演示页面的最顶端描述的 ui.bootstrap 模块的依赖性:

In your plunker you are not declaring dependency on the ui.bootstrap module as described on the very top of the demo page:

只要你有下载的所有文件,并包含在您
  网页你只需要声明ui.bootstrap模块的依赖关系:
  angular.module(MyModule的',['ui.bootstrap']);

As soon as you've got all the files downloaded and included in your page you just need to declare a dependency on the ui.bootstrap module: angular.module('myModule', ['ui.bootstrap']);

所提到的模块上添加依赖后,你的plunker作品,以及:
<一href=\"http://plnkr.co/edit/00bK0rNDYIrH9a9TVRk3?p=$p$pview\">http://plnkr.co/edit/00bK0rNDYIrH9a9TVRk3?p=$p$pview

After adding a dependency on the mentioned module your plunker works as well: http://plnkr.co/edit/00bK0rNDYIrH9a9TVRk3?p=preview

还有一件事 - 你需要至少AngularJS 1.0.5 - 有早期版本AngularJS的臭虫$ P $正常工作pvented这个指令

One more thing - you need at least AngularJS 1.0.5 - there were bugs in earlier versions of AngularJS that prevented this directive from working correctly.

这篇关于角UI的引导手风琴不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆