AngularJS v1.2.5脚本错误,使用IE11的textarea和占位符属性

 哈铁鸡西青年志愿者 发布于 2023-02-09 17:56

我有一个Angular JS v1.2.5表单,在IE11中不起作用.它在Firefox,Chrome,Safari中运行良好.我的表单在占位符属性中使用带插值的textarea.

  
    

Hello {{ name }}!

如果使用插值指定占位符属性,则会出现以下错误(仅在IE中).

Error: Invalid argument.
   at interpolateFnWatchAction (https://localhost:44300/Scripts/angular.js:6410:15)
   at $digest (https://localhost:44300/Scripts/angular.js:11581:23)
   at $apply (https://localhost:44300/Scripts/angular.js:11832:13)
   at done (https://localhost:44300/Scripts/angular.js:7774:34)
   at completeRequest (https://localhost:44300/Scripts/angular.js:7947:7)
   at onreadystatechange (https://localhost:44300/Scripts/angular.js:7903:11)

这是一个在Firefox,Chrome,Safari中运行良好的Plnkr,但不适用于IE11. http://plnkr.co/edit/4cJzxtVSDoL2JMI9nYrS?p=preview

我失去了尝试在Angular.js内部进行调试.我真的很感激任何让我朝着正确方向前进的提示.谢谢.

1 个回答
  • 我能够使用ng-attr-placeholder指令在IE中正常工作,而不是直接绑定到DOM中的属性.例如:

    <textarea ng-attr-placeholder="Description of the {{ name }}"></textarea>
    

    2023-02-09 17:58 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有