I do have a progress bar
<div class="progress-bar-line red" role="progressbar"
aria-valuenow="redrated" aria-valuemin="0" aria-valuemax="100"
ngStyle="max-width:{{redrated}}%"
>
<span class="title">{{ redrated }}%</span>
</div>
I have used ngStyle="max-width:{{redrated}}%"
and tried attempts:
- Have made a object in component and called that in ng style
- Even
ngStyle="{'max-width': '20px' }"
is also giving the same error please help me solve this
The correct syntax is to define pixels in the key, not in the value:
See https://angular.io/api/common/NgStyle