0

should get same result from parent component to child component in angular. ngclass giving not exact result in child component. Need correct format of it.

[ngClass]="{
                'card-color': !deviceStatus[element.devID]?.status,
                'cell-danger':
                  element[sensor.sensorId].value <
                    element[sensor.sensorId].min ||
                  element[sensor.sensorId].value >
                    element[sensor.sensorId].max
              }"
2
  • Your question is missing details, e.g., how do you enter the data into your child.component, what is not working. Please add more details and code samples to your questions, otherwise we cannot help you Commented Feb 28, 2022 at 7:51
  • I'm asking is it correct way of ngclass syntax mentioned above. Commented Mar 2, 2022 at 18:13

0

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.