Try this approach
[ngStyle]="isTrue ? {width: '50px', height: '20px'} : {}"
Or
[ngStyle]="{
width: '50px',
height: '20px'
}"
Try this approach
[ngStyle]="isTrue ? {width: '50px', height: '20px'} : {}"
Or
[ngStyle]="{
width: '50px',
height: '20px'
}"