4

I have some inputs in md-card. there is a way to do like:

 <md-card-content [disabled]="phone._id>

Instead each one? tanks.

yantrab
  • 2,482
  • 4
  • 31
  • 52

1 Answers1

10

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>
zurfyx
  • 31,043
  • 20
  • 111
  • 145
  • This is not fully supported in IE, only some fields actually become disabled: https://caniuse.com/#feat=fieldset-disabled – BlueCaret Apr 04 '18 at 15:00
  • What if you have buttons into the disabled fieldset and you have to enable it? I mean, all of the input, textearea, select, including buttons going to be disabled with the attr disabled in the parent fieldset. – Alejandro Liébana Jan 08 '19 at 13:43