Answer the question
In order to leave comments, you need to log in
How to set formula for angular block height?
guys, tell me please. How to set the formula for block height? The formula is already there, but I don’t know where and how to prescribe it
Answer the question
In order to leave comments, you need to log in
In the template: <div [style.height.px]="blockHeight"></div>
where blockHeight
is the component variable. Of
course, you can use the whole function in the template, [style.height.px]="calculateHeight()"
like the function will be called every time a change detection occurs. It is better then to make a pipe that will calculate the value from some initial value, or make a directive that will set the height for the blocks.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question