Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/397.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 未能加载模板:uib/template/modal/window.html(未找到HTTP状态404)_Javascript_Angularjs_Angular Ui Bootstrap - Fatal编程技术网

Javascript 未能加载模板:uib/template/modal/window.html(未找到HTTP状态404)

Javascript 未能加载模板:uib/template/modal/window.html(未找到HTTP状态404),javascript,angularjs,angular-ui-bootstrap,Javascript,Angularjs,Angular Ui Bootstrap,我已经将ui引导添加到angular 1.x项目中,当我想要打开一个模式表单时,会出现这个错误 [$compile:tpload]未能加载模板:uib/template/modal/window.html(HTTP状态:404未找到) 我以前使用过ui引导,而且一直都很好,但在我的新项目中,我遇到了问题 代码如下: $uibModal.open( { backdrop: 'static', templateUrl: 'DesktopModules/' + window.GLOB.modul

我已经将ui引导添加到angular 1.x项目中,当我想要打开一个模式表单时,会出现这个错误

[$compile:tpload]未能加载模板:uib/template/modal/window.html(HTTP状态:404未找到)

我以前使用过ui引导,而且一直都很好,但在我的新项目中,我遇到了问题

代码如下:

$uibModal.open(
{ backdrop: 'static', templateUrl: 'DesktopModules/' + 
  window.GLOB.moduleFolderName + '/app/form/form.html',
  controller: 'requestCtrl',
  size: 'sm',
  scope: $scope 
 });
角度版本:v1.5.8

UIBS:v2.2.0


引导:v3.3.7

您缺少模式模板
uib/template/modal/window.html

确保已加载
ui引导tpls.js

tpls
标记表示文件包含模板


供参考:

ui-bootstrap-tpls.js
angular.module(“ui.bootstrap”
[“ui.bootstrap.tpls”
“ui.bootstrap.transition”
“ui.bootstrap.collapse”
“用户界面、引导、手风琴”
“ui.bootstrap.alert”
“ui.bootstrap.bindHtml”
“ui.bootstrap.buttons”
“ui.bootstrap.carousel”
“ui.bootstrap.position”
“ui.bootstrap.datepicker”
“ui.bootstrap.dropdownToggle”
“ui.bootstrap.modal”
“ui.bootstrap.pagination”
“ui.bootstrap.tooltip”
“ui.bootstrap.popover”
“ui.bootstrap.progressbar”
“ui.bootstrap.rating”
“ui.bootstrap.tabs”
“ui.bootstrap.timepicker”
“ui.bootstrap.typeahead”];
angular.module(“ui.bootstrap.tpls”
[“template/accordion/accordion group.html”
“模板/accordion/accordion.html”
“模板/alert/alert.html”
“模板/carousel/carousel.html”
“模板/carousel/slide.html”
“模板/datepicker/datepicker.html”
“模板/datepicker/popup.html”
“模板/modal/background.html”
“template/modal/window.html”//<----您的案例
“模板/pagination/pager.html”
“模板/pagination/pagination.html”
“模板/工具提示/工具提示html不安全弹出窗口.html”
“模板/tooltip/tooltip popup.html”
“模板/popover/popover.html”
“模板/progressbar/bar.html”
“模板/progressbar/progress.html”
“模板/rating/rating.html”
“模板/tabs/tab.html”
“模板/tabs/tabset titles.html”
“模板/tabs/tabset.html”
“模板/timepicker/timepicker.html”
“模板/typeahead/typeahead match.html”
“template/typeahead/typeahead popup.html”]);
angular.module('ui.bootstrap.transition'
[])

我们已经解决了这个问题, 我们曾经 $templateCache.removeAll();
要始终具有文件的新版本,而不是缓存文件,此功能会干扰ui引导的模板文件的加载

我已经添加了提到的文件,但问题出在其他地方。@MahyarPasarzangene您找到问题了吗?您是如何添加该文件的?
angular.module("ui.bootstrap"
 ["ui.bootstrap.tpls"
 "ui.bootstrap.transition"
"ui.bootstrap.collapse"
"ui.bootstrap.accordion"
"ui.bootstrap.alert"
"ui.bootstrap.bindHtml"
"ui.bootstrap.buttons"
"ui.bootstrap.carousel"
"ui.bootstrap.position"
"ui.bootstrap.datepicker"
"ui.bootstrap.dropdownToggle"
"ui.bootstrap.modal"
"ui.bootstrap.pagination"
"ui.bootstrap.tooltip"
"ui.bootstrap.popover"
"ui.bootstrap.progressbar"
"ui.bootstrap.rating"
"ui.bootstrap.tabs"
"ui.bootstrap.timepicker"
"ui.bootstrap.typeahead"]);

angular.module("ui.bootstrap.tpls"
 ["template/accordion/accordion-group.html"
"template/accordion/accordion.html"
"template/alert/alert.html"
"template/carousel/carousel.html"
"template/carousel/slide.html"
"template/datepicker/datepicker.html"
"template/datepicker/popup.html"
"template/modal/backdrop.html"
"template/modal/window.html"   //     < ---- Your case
"template/pagination/pager.html"
"template/pagination/pagination.html"
"template/tooltip/tooltip-html-unsafe-popup.html"
"template/tooltip/tooltip-popup.html"
"template/popover/popover.html"
"template/progressbar/bar.html"
"template/progressbar/progress.html"
"template/rating/rating.html"
"template/tabs/tab.html"
"template/tabs/tabset-titles.html"
"template/tabs/tabset.html"
"template/timepicker/timepicker.html"
"template/typeahead/typeahead-match.html"
"template/typeahead/typeahead-popup.html"]);
angular.module('ui.bootstrap.transition'
 [])