I know this question was already asked regarding calculation using pixles. I want to know if there is anyway you can do calculations using percentages and pixels in the style binding target in Angular2.
I've tried:
[style.width]="100%-16+'px'"
[style.width.px]="100%-16"
I also tried this:
@Input() width: number;
_width = 'auto';
this._width = this.width ? this.width + 'px' : 'auto'
width="calc(100% - 16)"
width="calc(100% - 16px)"
width="100% - 16"
width="100% - 16px"