角靴式手风琴无法打开 [英] angular-bootstrap accordion won't open

查看:78
本文介绍了角靴式手风琴无法打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

柱塞: http://plnkr.co/edit/Sjfb3Esx1NsjwaYGLMGZ?p=preview

Accordion在服务器"选项卡中.

Accordion is in the servers tab.

实际上是工作的.我的真实应用程序没有.唯一没有真正复制的就是ui-router的东西.在我实际的应用程序中,手风琴无法打开.关于SO的其他问题说,不包括ui.bootstrap并解决了他们的问题.我确实包括了ui.bootstrap.

The plunker actually works. My real app does not. The only thing that plunker is not really replicating is the ui-router stuff. On my actual app the accordion won't open. Other questions on SO say that ui.bootstrap is not included and that fixed their problem. I do have ui.bootstrap included though.

我还尝试从 http://angular-ui.github复制和粘贴示例.io/bootstrap/也不起作用.

I've also tried copying and pasting the example from http://angular-ui.github.io/bootstrap/ that doesn't work either.

我不知所措.

更多信息:

我没有收到任何错误.另外,其他ui-bootstrap指令也可以正常工作.我在同一页面上使用标签,而在其他页面上使用模式和下拉菜单.

I'm not getting any errors. Also other ui-bootstrap directives work just fine. I'm using tabs on this same page, and modal and dropdown work on other pages.

推荐答案

根据我的评论:

这是我的模板.不知何故,我的模板文件与js文件不同步.在模板中,它正在调用ng-click ="toggleOpen()",该代码在我的代码中不存在.当我将其回滚到ng-click ="isOpen =!isOpen"时,一切都会按预期进行.我需要弄清楚为什么我的模板和js文件不同步.

It's my template. Somehow my template files are out of sync with the js files. In the template it is calling ng-click="toggleOpen()" which does not exist in my code. When I roll that back to ng-click="isOpen = !isOpen" everything works as expected. I need to figure out why my templates and js files are out of sync.

我使用不包含模板文件的Bower安装了ui-bootstrap.我需要在开发过程中禁用模板缓存,以便不能使用tpls代码.我从github下载了模板目录,其中一些模板根本与bower下载的代码版本不匹配.我将模板文件更新为与Bower中的代码正确匹配的旧版本.现在一切正常.

I installed ui-bootstrap using bower which does not include template files. I need to disable template caching during development so I can't use the tpls code. I downloaded the template directory from github and some of the templates simply do not match up with the version of code that bower downloads. I updated the template file to an older version that correctly matches the code from bower. Everything works now.

这篇关于角靴式手风琴无法打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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