I am currently working on a parent component and child component setup, where I am utilizing the child component's selector to display it within the parent component.
Here is my child component's HTML:
<div class="main-container" [ngStyle]="{'transform': 'scaleX(widthScale) scaleY(heightScale)'}">
<img src="../../assets/svg/kiln-main.jpg" class="kiln-image">
<svg id="area2"></svg>
<svg id="area"></svg>
</div>
This is the TypeScript code for the child component:
@Input() widthScale:string;
@Input() heightScale:string;
My goal is to dynamically apply "transform: scaleX() scaleY()" to the child component based on values passed from the parent component.
This is how the parent component is being used:
<app-child [widthScale]="0.5" [heightScale]="0.5"></app-child>
Unfortunately, the above implementation seems to be failing. How can I correctly assign values to the CSS property "transform" in this scenario?