The main goal here is to increase the vertical pixel count.
<spacer [height]="200"></spacer>
Initially facing an issue where an error message states that height is not a recognized attribute of spacer. To address this problem, I set up the following code:
<div [ngStyle]="{'padding': 'getHeight()'}">
</div>
import {Component, Input} from '@angular/core';
@Component({
selector: 'spacer',
templateUrl: './spacer.component.html',
styleUrls: ['./spacer.component.scss']
})
export class SpacerComponent {
@Input() height = '';
constructor() { }
getHeight() {
return this.height;
}
}
Does this mean that height is indeed a property? Additionally, I am looking to append 'px' to the height but that seems to complicate matters further. Any assistance would be greatly appreciated.
Thank you, Yogi.