I needed to toggle a simple style for a <div>
and it’s children, so I did it like this:
let parent: HTMLElement | null = document.getElementById('thirdElement');
const children : any = parent.children;
for(let i=1; i < children.length; i++)
{
if (children[i].style.cssText.includes("display: flex;"))
{
this.renderer.setStyle(children[i], 'display', 'none');
} else {
this.renderer.setStyle(children[i], 'display', 'flex');
}
}
this is a simple workaround for Renderer not having getStyle or getClass methods. hope this helps.