I want to use a variable width in my angular 5 component template, just like this:
<style>
input:checked + .slider:before {
transform: translateX({{width}}px);
}
</style>
While 'width' is a variable defined in component!
however the "{{width}}" is not parsed ,how to implement this function.thanks!