Angularjs   发布时间:2022-04-20  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了angularjs – 奇怪的angle-ui datepicker依赖性错误大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
只是重新安装了一些凉爽的组件,但是这里的组件没有更新,相同的0.12.0 ui.bootstrap。还使用ui-router 0.2.13将状态更改为另一个页面

奇数错误信息是

错误:[$ compile:ctreq]无法找到指令’daypicker’所需的控制器’datepicker’!

但是当我看看ui-bootstrap-tpls.js文件时,datepicker控制器被直接定义在daypicker之上,应该被拾取。

这可能是由于一个错误的冲突的datepicker类名或某事吗?

我知道这不是很多,但会更新,因为我有时间添加代码。似乎有可能在某个地方有冲突的日期戳。它只发生在stateChange从一个页面到另一个页面。使用datepicker的完整流程工作正常,直到最后一页。如果控制器依赖关系在同一个文件中,怎么可能会被错过?

在任何人看到这个机会之前,我将不胜感激任何指导。

updatE Apr 23 15:正在使用带有表单的模态对话框,将会将用户发送到另一个页面上,单击确定。

我有这个错误更新到ui.bootstrap 0.14.x.

我已经在自己的模块中覆盖了造成问题的模板:

angular.module("template/datepicker/datepicker.html",[]).run(["$templateCache",function ($templateCachE) {
    $templateCache.put("template/datepicker/datepicker.html","<div ng-switch=\"datepickerMode\" role=\"application\" ng-keydown=\"keydown($event)\">\n" +
      "  <daypicker ng-switch-when=\"day\" tabindex=\"0\"></daypicker>\n" +
      "  <monthpicker ng-switch-when=\"month\" tabindex=\"0\"></monthpicker>\n" +
      "  <yearpicker ng-switch-when=\"year\" tabindex=\"0\"></yearpicker>\n" +
      "</div>");
    }]);

卸下模块后,再次工作。

本来我已经改变了使用font-awesome图标而不是glyphicons的模板。现在我覆盖glyphicon css类改为font-awesome图标:

.glyphicon {
    font: normal normal normal 14px/1 ourIconFont;
}
.glyphicon-arrow-right:before,.glyphicon-chevron-right:before {
    content: "\f054";
}
.glyphicon-arrow-left:before,.glyphicon-chevron-left:before {
    content: "\f053";
}

大佬总结

以上是大佬教程为你收集整理的angularjs – 奇怪的angle-ui datepicker依赖性错误全部内容,希望文章能够帮你解决angularjs – 奇怪的angle-ui datepicker依赖性错误所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。