I would like to pass my component property values to inline css.
<div [ngStyle]="{ 'width': '{{ object.value }}%' }">
The method is not working and getting error:-
Parser Error: Got interpolation ({{}}) where expression was expected
CodePudding user response:
Your syntax is wrong. Use one of below syntax
[style.width.%]="object.value"
Or
[ngStyle]="{ 'width.%': object.value }"