Angularjs中的残疾文本区域

发布于 2025-02-07 21:14:01 字数 114 浏览 3 评论 0原文

我正在尝试将残疾人属性放入AngularJS中,它根本不起作用,我已经尝试了ng-disabled =“ true”,通过脚本,它不起作用。如果我将其更改为正常,但是我需要使用。有人知道该怎么做吗?

I'm trying to put the disabled attribute in in angularJS It doesn't work at all, I've already tried ng-disabled="true", via script and it doesn't work. If I change it to it works normal, but I need to do it with the . Does anyone know how to do it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

深海夜未眠 2025-02-14 21:14:01

可以说,如果您有这样的文本方面

<textarea type="text" ng-model="someModel" ng-readonly="disablingAttribute"></textarea> 

,则在控制器内部

$scope.disablingAttribute = true;

将在功能上禁用文本方面。
有关此信息的更多信息,请阅读有关 ng-readonly 指令

Lets say you have a textarea like this

<textarea type="text" ng-model="someModel" ng-readonly="disablingAttribute"></textarea> 

And inside your controller if you have

$scope.disablingAttribute = true;

It will functionally disable your textarea.
For more information on this, read about ng-readonly directive

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文