Angular: Stop Manipulating DOM With ElementRef

Kevin MATHY
Jul 26, 2017 · 2 min read

I need to share this story with you. Recently, I discovered the power of Renderer in Angular.

(Renderer is deprecated so use Renderer2; however, I will just use Renderer in this article.)

Manipulating the DOM is easy with Angular. We can directly access the element by using ElementRef provided by @angular/core.

Keep the story going. Sign up for an extra free read.

You've completed your member preview for this month, but when you sign up for a free Medium account, you get one more story.
Already have an account? Sign in

Kevin MATHY

Written by

Web developer & Angular Specialist

Better Programming

Advice for programmers.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade