Tutorial hero image
Lesson icon

Safely Modifying Elements with ElementRef & Renderer in Ionic

1 min read

Originally published August 15, 2017

There often comes a time where we will need to modify the properties of an element in our application: its background color, or its position, or something else. By using ElementRef we are able to easily get a reference to an element and its properties, and although we can modify the element's properties directly through the ElementRef, this is not the best way to do it.

In this video tutorial, we look at how to update DOM elements in a platform agnostic way with Angular's Renderer.

Here's the video:

If you enjoyed this article, feel free to share it with others!