yantrab
yantrab

Reputation: 2652

There is some way to disabled set of inputs in angular 2?

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

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

Instead each one? tanks.

Upvotes: 4

Views: 5038

Answers (1)

zurfyx
zurfyx

Reputation: 32767

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>

Upvotes: 10

Related Questions