I created a unique shape and I need to determine its height using a TypeScript function. However, the ngStyle doesn't seem to be applying the height correctly.
HTML:
<div class = "shape" [ngStyle] = "{'height': DetermineShapeHeight()}" (click) = 'onSelect()'>
Function:
DetermineShapeHeight(): number {
let ShapeHeight = ((this.Shape.size.Width * 2) +
(this.Shape.size.Height)) * 3;
if (ShapeHeight <= 100) {
ShapeHeight = 100;
}
console.log(ShapeHeight);
return ShapeHeight;
}
What could be causing this issue?