gl-ref
This directive is used to create an internal reference to any element in your controller and access the DOM element.
<div gl-ref="anything"></div>
So, we create a reference called anything
and we will fetch it in the following JS code:
Controller.$refs.get("anything").innerHTML = "Test";
After this, the innerHTML
of the element will be set to Test
. Keep in mind that the returned value of $refs.get
return a plain DOM element with no added properties from GreenLight.