Ben Ben - 1 year ago 161
CSS Question

Angular2 get css property

How can I get css properties from a ElementRef element?
I've tried to use
but all the properties are empty.
The Renderer class has
method but there is no

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download