'can't getting same in child component

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
              }"


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source