#angular
If you want DOM manipulation on **existing** el, using ElementRef or DOCUMENT is fine.
But if you want to create DOM elements **dynamically**, using Renderer2 is correct because Angular creates different Renderers based on the component's ViewEncapsulation metadata.
šRenderer2 makes it possible to do DOM manipulations in a way that #angular is aware of - that helped me solve an issue I had today:
šcomponent styles were not applied to the dynamically generated elements with DOM APIs without disabling view encapsulation š
#angular
I've had this post for way too long in my drafts, but it's now out: āViewEncapsulationā in @Angular
Covering the basics, but still š
dzhavat.github.io/2023/10/03ā¦
Angular š angularjobs.com/curated/angu⦠(ramya-bala221190ā¤medium.com)
ViewEncapsulation has been something I have avoided for the longest time, without realizin
Day 5 of learning Angular - Covered basics on ViewEncapsulation
This includes:
Ā· Shadow DOM
Ā· None Mode
Ā· Native Mode
Ā· Emulated Mode
#100DaysOfCode
How ViewEncapsulation and ng-deep work in Angular
"
Many Angular developers and layout designers who write CSS/SCSS code in Angular applications have encountered a situation where they need to apply styles to a component nested in the current one and, without fully understanding