Skip to content

Raw Value

There are occasions where we want to declaratively set a value on a property of the parent element, we can use ngt-value element to do this.

1
<!-- this saves us the trouble of getting access to the PointLight instance and assign 0.0001 to light.shadow.bias -->
2
<ngt-point-light>
3
<!-- with this, we can declaratively assign a value to shadow.bias; under an ngIf or something similar -->
4
<ngt-value [rawValue]="0.0001" attach="shadow.bias" />
5
</ngt-point-light>