有一些方法可以禁用角度2中的一组输入? [英] There is some way to disabled set of inputs in angular 2?
本文介绍了有一些方法可以禁用角度2中的一组输入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在md卡中有一些输入. 有一种方法可以做到:
I have some inputs in md-card. there is a way to do like:
<md-card-content [disabled]="phone._id>
而不是每个? 坦克.
推荐答案
是的,您可以创建一个<fieldset>
,与<form>
之类的其他元素不同,该<fieldset>
接受[disabled]
属性.
Yes, you can create a <fieldset>
which, unlike other elements like <form>
, accepts [disabled]
property.
所有这些必须一起禁用的字段必须放在其中,就像下面的示例一样:
All these fields that require to be disabled together have to be place inside it, just like in the following example:
<fieldset [disabled]=[true]>
<input type="text" ...>
<input ...>
</fieldset>
这篇关于有一些方法可以禁用角度2中的一组输入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文