在角UI自举模式开启时,404 Not Found错误 [英] 404 Not Found error when opening modal in Angular UI Boostrap

查看:155
本文介绍了在角UI自举模式开启时,404 Not Found错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用UI引导的时候有一个很奇怪的问题。甚至最简单的例子是行不通的。因此,这是我的情况:

I have a really strange problem when using UI Bootstrap. Even the simplest example does not work. So this is my case:

我必须使用插件自耕农戏剧框架应用程序: https://github.com/tuplejump/play -yeoman 。它使用AngularJS和Bootstrap。到目前为止,一切运行良好,但这些奇怪的错误上来时,我试图从打开使用UI引导库我的第一模http://angular-ui.github.io/ 。我用确切的code从 http://angular-ui.github.io/引导/#/莫代尔但不知何故,这是行不通的。这是code打开我的模态:

I have a Play Framework application using the yeoman plugin: https://github.com/tuplejump/play-yeoman. It is using AngularJS and Bootstrap. So far everything worked fine, but these weird errors came up when I tried to open my first modal using the UI Bootstrap library from http://angular-ui.github.io/. I used the exact code from http://angular-ui.github.io/bootstrap/#/modal but somehow it does not work. This is the code for opening my modal:

var modalInstance = $modal.open({
    templateUrl: 'myModalContent.html',
    controller: ModalInstanceCtrl,
    size: size,
    resolve: {
      items: function () {
        return ['item1', 'item2', 'item3'];
      }
    }
  });

和出现在开发者控制台中的错误是:

And the errors that appear in the dev console are:

GET http://localhost:9000/ui/function%20(a,b)%7Breturn%20b.templateUrl%7C%7C%22template/modal/window.html%22%7D 404 (Not Found) angular.js:9499
Uncaught TypeError: undefined is not a function angular.js:9512

我尝试了类似的问题很多解决方案,但没有奏效。这是我的加载UI的自举:

I tried many solutions for similar problems but none of that worked. This is how I load the ui-boostrap:

<script src="components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>

我一直在寻找了很长时间解决方案,但我还没有在URL中遇到的函数%20(A,B)7%的一个问题...并没有soluions的没有工作。任何帮助AP preciated!

I've been searching for solution for a long time but I haven't encountered a problem with the function%20(a,b)%7... in the URL and none of the soluions did work. Any help appreciated!

推荐答案

我有同样的问题,这似乎是一个版本冲突。我采用了棱角分明的版本1.0.8和角度引导0.11.0。升级到1.2.21角后,这个问题似乎已经解决了。

I had this same issue, and it appeared to be a version conflict. I was using Angular version 1.0.8 and Angular Bootstrap 0.11.0. After upgrading to Angular 1.2.21, the problem seems to have been resolved.

这篇关于在角UI自举模式开启时,404 Not Found错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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