简体   繁体   English

Angular js IE11 Bug - 参数无效

[英]Angular js IE11 Bug - Invalid argument

I have a bug in my angular project only happens in IE, see issue below: 我的角度项目中有一个错误只发生在IE中,请参阅下面的问题:

Error: Invalid argument.
   at interpolateFnWatchAction (http://localhost:51051/scripts/angular.js:6898:19)
   at Scope.prototype.$digest (http://localhost:51051/scripts/angular.js:12395:23)
   at Scope.prototype.$apply (http://localhost:51051/scripts/angular.js:12660:13)
   at done (http://localhost:51051/scripts/angular.js:8272:34)
   at completeRequest (http://localhost:51051/scripts/angular.js:8477:7)
   at xhr.onreadystatechange (http://localhost:51051/scripts/angular.js:8416:11)

I have got some placeholders on some of the pages, I have tried removing them but the issue still happing. 我在某些页面上有一些占位符,我尝试删除它们但问题仍然存在。

Any ideas? 有任何想法吗?

Thanks 谢谢

I received the same error in the following cases, both where the problem code was executing as part of the XHR callback: 我在以下情况下收到了同样的错误,这两个问题代码都是作为XHR回调的一部分执行的:

  1. setting $scope variables 设置$ scope变量
  2. using JQuery to perform DOM manipulations 使用JQuery执行DOM操作

I resolved 1 by moving/dropping the setting code to another code location, and 2 by wrapping the problem code in an angular $timeout call. 我通过将设置代码移动/删除到另一个代码位置来解决1,并通过将问题代码包装在角度$ timeout调用中来解决问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM