Search code examples
htmlangularstylesprogress-bar

Pass style from string format HTML


I would like to passing parameter in [[ style="width:{{item.number}}" ]]

not DOM pls


Solution

  • You can do it with ngStyle like this:

    <div [ngStyle]="{'width.px': someVariable }"></div>