加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

angularjs – 奇怪的angle-ui datepicker依赖性错误

发布时间:2020-12-17 08:13:02 所属栏目:安全 来源:网络整理
导读:只是重新安装了一些凉爽的组件,但是这里的组件没有更新,相同的0.12.0 ui.bootstrap。还使用ui-router 0.2.13将状态更改为另一个页面。 奇数错误信息是 错误:[$ compile:ctreq]无法找到指令’daypicker’所需的控制器’datepicker’! 但是当我看看ui-boo
只是重新安装了一些凉爽的组件,但是这里的组件没有更新,相同的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";
}

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读