How can I get css properties from a ElementRef element?
I've tried to use
element.style
this.renderer.setElementStyle
this.renderer.getElementStyle
elementRef
instance has a nativeElement
property which is an element node itself and contains most of the properties one may need.
Another solution which is well supported by modern browsers is
window.getComputedStyle(elementRef.nativeElement)