How can I calculate the height of a div given text length and the width of a div in angular?
const containerWidth = this.container.nativeElement.offsetWidth;
let rows = text.length*fontSize/containerWidth;
rows = Math.max(1, rows );
This is my attempt, but it is adding more than needed.