我试图从控制器更改输入占位符的值,但无法弄清楚如何.
input(type='text', ng-model='inputText', side='30', placeholder='enter username')
Run Code Online (Sandbox Code Playgroud)
有没有办法修改模型的元素属性?
我有一个Angular JS v1.2.5表单,在IE11中不起作用.它在Firefox,Chrome,Safari中运行良好.我的表单在占位符属性中使用带插值的textarea.
<body ng-controller="MainCtrl">
<p>Hello {{ name }}!</p>
<textarea rows="4" placeholder="Description of the {{ name }}"></textarea>
</body>
Run Code Online (Sandbox Code Playgroud)
如果使用插值指定占位符属性,则会出现以下错误(仅在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)
Run Code Online (Sandbox Code Playgroud)
这是一个在Firefox,Chrome,Safari中运行良好的Plnkr,但不适用于IE11. http://plnkr.co/edit/4cJzxtVSDoL2JMI9nYrS?p=preview
我失去了尝试在Angular.js内部进行调试.我真的很感激任何让我朝着正确方向前进的提示.谢谢.