- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个 SELECT 元素定义如下:
<select class="form-control ng-pristine ng-untouched ng-valid"
ng-options="composer.Name for composer in composerList track by composer.Name | orderBy:'Name'"
ng-model="selectedComposer">
composerList
和 selectedComposer
在 Controller 中创建如下:
AlbumService.getComposerList().then(function (data) {
$scope.composerList = data; //data comes from a REST response in the service
$scope.selectedComposer = $scope.album.Composer;
});
composer
的结构只是简单的Id
和Name
属性,但它会在未来扩展。
问题出在上面的 SELECT
元素上。它正在抛出一些 10 $digest() 达到的迭代。正在中止!
错误。
Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
Watchers fired in the last 5 iterations: [[{"msg":"fn: function() { return ngOptions.getTrackByValue(ngModelCtrl.$viewValue); }","newVal":["J","o","h","n"," ","W","i","l","i","a","m","s"],"oldVal":["J","o","h","n"," ","W","i","l","i","a","m","s"]},{"msg":"fn: interceptedExpression","newVal":138,"oldVal":121}],[{"msg":"fn: function() { return ngOptions.getTrackByValue(ngModelCtrl.$viewValue); }","newVal":["J","o","h","n"," ","W","i","l","i","a","m","s"],"oldVal":"..."},{"msg":"fn: interceptedExpression","newVal":155,"oldVal":138}],[{"msg":"fn: function() { return ngOptions.getTrackByValue(ngModelCtrl.$viewValue); }","newVal":["J","o","h","n"," ","W","i","l","i","a","m","s"],"oldVal":"..."},{"msg":"fn: interceptedExpression","newVal":172,"oldVal":155}],[{"msg":"fn: function() { return ngOptions.getTrackByValue(ngModelCtrl.$viewValue); }","newVal":["J","o","h","n"," ","W","i","l","i","a","m","s"],"oldVal":"..."},{"msg":"fn: interceptedExpression","newVal":189,"oldVal":172}],[{"msg":"fn: function() { return ngOptions.getTrackByValue(ngModelCtrl.$viewValue); }","newVal":["J","o","h","n"," ","W","i","l","i","a","m","s"],"oldVal":"..."},{"msg":"fn: interceptedExpression","newVal":206,"oldVal":189}]]
https://errors.angularjs.org/1.7.2/$rootScope/infdig?p0=10&p1=%5B%5B%7B%22msg%22%3A%22fn%3A%20function()%20%7B%20return%20ngOptions.getTrackByValue(ngModelCtrl.%24viewValue)%3B%20%7D%22%2C%22newVal%22%3A%5B%22J%22%2C%22o%22%2C%22h%22%2C%22n%22%2C%22%20%22%2C%22W%22%2C%22i%22%2C%22l%22%2C%22i%22%2C%22a%22%2C%22m%22%2C%22s%22%5D%2C%22oldVal%22%3A%5B%22J%22%2C%22o%22%2C%22h%22%2C%22n%22%2C%22%20%22%2C%22W%22%2C%22i%22%2C%22l%22%2C%22i%22%2C%22a%22%2C%22m%22%2C%22s%22%5D%7D%2C%7B%22msg%22%3A%22fn%3A%20interceptedExpression%22%2C%22newVal%22%3A138%2C%22oldVal%22%3A121%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20function()%20%7B%20return%20ngOptions.getTrackByValue(ngModelCtrl.%24viewValue)%3B%20%7D%22%2C%22newVal%22%3A%5B%22J%22%2C%22o%22%2C%22h%22%2C%22n%22%2C%22%20%22%2C%22W%22%2C%22i%22%2C%22l%22%2C%22i%22%2C%22a%22%2C%22m%22%2C%22s%22%5D%2C%22oldVal%22%3A%22...%22%7D%2C%7B%22msg%22%3A%22fn%3A%20interceptedExpression%22%2C%22newVal%22%3A155%2C%22oldVal%22%3A138%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20function()%20%7B%20return%20ngOptions.getTrackByValue(ngModelCtrl.%24viewValue)%3B%20%7D%22%2C%22newVal%22%3A%5B%22J%22%2C%22o%22%2C%22h%22%2C%22n%22%2C%22%20%22%2C%22W%22%2C%22i%22%2C%22l%22%2C%22i%22%2C%22a%22%2C%22m%22%2C%22s%22%5D%2C%22oldVal%22%3A%22...%22%7D%2C%7B%22msg%22%3A%22fn%3A%20interceptedExpression%22%2C%22newVal%22%3A172%2C%22oldVal%22%3A155%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20function()%20%7B%20return%20ngOptions.getTrackByValue(ngModelCtrl.%24viewValue)%3B%20%7D%22%2C%22newVal%22%3A%5B%22J%22%2C%22o%22%2C%22h%22%2C%22n%22%2C%22%20%22%2C%22W%22%2C%22i%22%2C%22l%22%2C%22i%22%2C%22a%22%2C%22m%22%2C%22s%22%5D%2C%22oldVal%22%3A%22...%22%7D%2C%7B%22msg%22%3A%22fn%3A%20interceptedExpression%22%2C%22newVal%22%3A189%2C%22oldVal%22%3A172%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20function()%20%7B%20return%20ngOptions.getTrackByValue(ngModelCtrl.%24viewValue)%3B%20%7D%22%2C%22newVal%22%3A%5B%22J%22%2C%22o%22%2C%22h%22%2C%22n%22%2C%22%20%22%2C%22W%22%2C%22i%22%2C%22l%22%2C%22i%22%2C%22a%22%2C%22m%22%2C%22s%22%5D%2C%22oldVal%22%3A%22...%22%7D%2C%7B%22msg%22%3A%22fn%3A%20interceptedExpression%22%2C%22newVal%22%3A206%2C%22oldVal%22%3A189%7D%5D%5D
at angular.js:138
at Scope.$digest (angular.js:18625)
at Scope.$apply (angular.js:18945)
at done (angular.js:12799)
at completeRequest (angular.js:13056)
at XMLHttpRequest.requestLoaded (angular.js:12961)
我不知道为什么会出现这些错误。无论解决方案是什么,我都需要保留 album
变量中的 selectedComposer
变量设置,我更愿意保留 SELECT
Composer 列表对象而不是 Composer 姓名的字符串列表。
感谢任何帮助。
最佳答案
对于以后可能会看到我的问题的其他人,我做了更多的研究,解决方案很简单。部分 ng-options 的轨道应该移动到字符串的末尾。
ng-options="composer.Name for composer in composerList | orderBy:'Name' track by composer.Name"
关于javascript - 选择 ng-options raising $digest() iterations reached error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51992582/
如何将最初使用 Digest::MD5.digest('abc') 编码的哈希字符串转换为以下格式的十六进制字符串 Digest::MD5.hexdigest(' abc')?不同之处在于,十六进制字
我正在尝试制作一个应用程序,用户可以在其中将音乐上传、下载和流式传输到 Amazon Web Services、Simple Storage Services (AWS-S3)。 我试图解决的一个问题
每当我运行测试或启动 Rails 服务器时,我都会收到此警告。 当我从 .rvm 文件夹运行 grep 时,我看到以下内容: grep -R 'Digest::Digest' . ./rubies/r
我收到以下错误 Digest::Digest is deprecated; use Digest 当我尝试启动我的 Rails 服务器时。我试图在我的源代码中搜索 Digest::Digest 但我没
我在解决这个问题时遇到了一些麻烦。我正在尝试编写一个通用函数,它可以接受任何 digest::Digest并吐出计算摘要的字符串形式(“十六进制字符串”)。 这是the non-generic ver
当我尝试使用我的应用程序启动 Tomcat6 时(我正在尝试从 Tomcat7 移植到 Tomcat6),我遇到了一个奇怪的解析问题。 Digester 本身不会声明错误,直到遇到意外的文件结尾 -
使用 Digest::SHA 有什么优势吗?超过Digest::SHA1或相反亦然?两者似乎都得到了维护,但我不认为 Digest::SHA1 与 Digest::SHA 一起存在的原因。 最佳答案
例如。当我用每个函数计算哈希时,我得到不同的结果。 PKI::PKI.digest("hola", "MD5") digest::digest("hola", "md5") 最佳答案 对摘要使用ser
在 AngularJS 范围内,$apply() 在每个事件处理程序(输入指令的 keydown/input 事件,选择指令的更改事件等)和其他一些情况下被调用。 见 small example .尽
我将从这个 XML/RDF 中提取值: Church of S. Giuda Taddeo or S. Onofrio - Gaeta Chiesa S. Giuda Taddeo
我得到java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester 错误,我被这个错误困扰了一个多月。我已经尝试了所有可用的
我正在为客户提供一个片段,以粘贴到他们引用我的 application.js 文件的静态 html 中。 因为它位于我无法控制的页面上,而且我不想在每次发布时都要求客户更新他们的代码片段,所以我想知道
我正在尝试在 Linux 中使用 curl 更改基于 Onvif 的相机的日期。我已经在 c# 中成功完成并使用摘要身份验证,但我被困在这种情况下。 我正在使用以下命令: curl -u "admin
我正在尝试通过 Eclipse ide 生成 jasper 报告,但是当我执行以下代码行时: jasperReport = JasperCompileManager.compileReport("re
我目前正在学习 Michael Hardtl 的 Rails 教程,在第 7 章中有一段以 require 'digest' 开头的代码。 .我跑sudo gem install digest并得到无
我有一个 perl 脚本,它使用 Digest::MD5 md5($data) 来获取 16 字节摘要(以不可读的形式 - 二进制),并且该摘要用于加密数据。现在我必须在 java 中反转上述过程,即
我使用 $http.get() 获取数据并将其作为参数传递给自定义过滤器以获取过滤数据。但它正在给予错误:$digest 已在进行中。 有谁知道如何避免此错误或以不同的方式实现相同的目标? var m
除了以纯文本形式发送凭据之外,摘要式身份验证与基本身份验证有何不同? 最佳答案 主要区别在于它不需要以明文方式通过网络发送用户名和密码。它也不受重放攻击的影响,因为它使用来自服务器的一次性号码。 服务
在签名的 apk 中,会有一个 META-INF/MANIFEST.MF 文件。在这个文件中,我们可以找到像这样的摘要: Name: res/layout/main.xml SHA1-Digest:
我是这个论坛的新手。乍一看,这个社区看起来棒极了。我有一个简单的问题。我正在使用 log4j 进行记录并且是 tomcat 的新手。我找到了设置日志规则的文件,文件名:server.log4j-con
我是一名优秀的程序员,十分优秀!