0

I have 2 class which are , I only want to enable or use the 2 class if it met the condition which is dealDispositionFormFields.isSubtenantTakingFullSpace === 'No'

How do we create the syntax for that using ngClass ? Thanks.

  1. use deal-form-date-picker
  2. enabled-input

How do we implement multiple class using ng class in angular ? . for example I want to use deal-form-date-picker class and enabled-input class if dealDispositionFormFields.isSubtenantTakingFullSpace === 'No'

#code

class="opacity87" [ngClass]="{'enabled-input':dealDispositionFormFields.isSubtenantTakingFullSpace === 'No'}"

1 Answer 1

1

Just add multiple classes and use your condition, ie.

<some-element [ngClass]="{'class1 class2 class3' : true}">...</some-element>

see Angular docs

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.